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: ---------------------------------------------------------------
16130: --
16131: if l_dml_operation = 'UPDATE' then
16132: --
16133: l_update := true;
16134: 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
16135: 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
16136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16131: if l_dml_operation = 'UPDATE' then
16132: --
16133: l_update := true;
16134: 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
16135: 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
16136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16132: --
16133: l_update := true;
16134: 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
16135: 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
16136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16140: 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;
16133: l_update := true;
16134: 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
16135: 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
16136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16140: 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;
16141: --
16134: 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
16135: 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
16136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16140: 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;
16141: --
16142: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16135: 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
16136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16140: 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;
16141: --
16142: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16143: --
16136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16140: 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;
16141: --
16142: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16143: --
16144: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16140: 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;
16141: --
16142: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16143: --
16144: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16145: --
16146: --DOUBT log_data('CPY',l_new_value,l_prefix || r_CPY_unique.name|| l_suffix,'REUSED');
16140: 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;
16141: --
16142: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16143: --
16144: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16145: --
16146: --DOUBT log_data('CPY',l_new_value,l_prefix || r_CPY_unique.name|| l_suffix,'REUSED');
16147: --
16148: end if ;
16159: p_target_business_group_id, nvl(l_popl_yr_perd_id, -999) ) ;
16160: fetch c_find_CPY_in_target into l_new_value ;
16161: if c_find_CPY_in_target%found then
16162: --
16163: 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
16164: 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
16165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16166: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16160: fetch c_find_CPY_in_target into l_new_value ;
16161: if c_find_CPY_in_target%found then
16162: --
16163: 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
16164: 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
16165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16166: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16161: if c_find_CPY_in_target%found then
16162: --
16163: 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
16164: 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
16165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16166: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16169: 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;
16162: --
16163: 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
16164: 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
16165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16166: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16169: 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;
16170: --
16163: 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
16164: 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
16165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16166: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16169: 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;
16170: --
16171: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16164: 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
16165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16166: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16169: 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;
16170: --
16171: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16172: --
16165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16166: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16169: 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;
16170: --
16171: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16172: --
16173: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16169: 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;
16170: --
16171: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16172: --
16173: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16174: end if ;
16175: --
16169: 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;
16170: --
16171: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16172: --
16173: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16174: end if ;
16175: --
16176: l_object_found_in_target := true ;
16177: end if;
16258: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
16259: -- Update all relevent cer records with new pk_id
16260: hr_utility.set_location('Before plsql table ',222);
16261: hr_utility.set_location('new_value id '||l_popl_yr_perd_id,222);
16262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16266: 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;
16259: -- Update all relevent cer records with new pk_id
16260: hr_utility.set_location('Before plsql table ',222);
16261: hr_utility.set_location('new_value id '||l_popl_yr_perd_id,222);
16262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16266: 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;
16267: hr_utility.set_location('After plsql table ',222);
16260: hr_utility.set_location('Before plsql table ',222);
16261: hr_utility.set_location('new_value id '||l_popl_yr_perd_id,222);
16262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16266: 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;
16267: hr_utility.set_location('After plsql table ',222);
16268: --
16261: hr_utility.set_location('new_value id '||l_popl_yr_perd_id,222);
16262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16266: 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;
16267: hr_utility.set_location('After plsql table ',222);
16268: --
16269: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16266: 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;
16267: hr_utility.set_location('After plsql table ',222);
16268: --
16269: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16270: --
16265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16266: 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;
16267: hr_utility.set_location('After plsql table ',222);
16268: --
16269: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16270: --
16271: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16272: elsif l_update then
16273: BEN_POPL_YR_PERD_API.UPDATE_POPL_YR_PERD(
16267: hr_utility.set_location('After plsql table ',222);
16268: --
16269: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16270: --
16271: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16272: elsif l_update then
16273: BEN_POPL_YR_PERD_API.UPDATE_POPL_YR_PERD(
16274: --
16275: P_VALIDATE => false
16327: end loop;
16328: --
16329: exception when others then
16330: --
16331: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CPY',r_cpy.information5 );
16332: --
16333: end create_CPY_rows;
16334:
16335: --
16472: end if ;
16473: -- End Prefix Sufix derivation
16474: for r_PET_unique in c_unique_PET('PET') loop
16475:
16476: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16477: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16478: r_PET_unique.information3 >=
16479: ben_pd_copy_to_ben_one.g_copy_effective_date)
16480: ) then
16473: -- End Prefix Sufix derivation
16474: for r_PET_unique in c_unique_PET('PET') loop
16475:
16476: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16477: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16478: r_PET_unique.information3 >=
16479: ben_pd_copy_to_ben_one.g_copy_effective_date)
16480: ) then
16481: --
16475:
16476: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16477: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16478: r_PET_unique.information3 >=
16479: ben_pd_copy_to_ben_one.g_copy_effective_date)
16480: ) then
16481: --
16482: hr_utility.set_location(' r_PET_unique.table_route_id '||r_PET_unique.table_route_id,10);
16483: hr_utility.set_location(' r_PET_unique.information1 '||r_PET_unique.information1,10);
16509: l_object_found_in_target := TRUE;
16510: --
16511: if l_process_date between r_PET_unique.information2 and r_PET_unique.information3 then
16512: l_update := true;
16513: 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)
16514: 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'
16515: then
16516: 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' ;
16517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16510: --
16511: if l_process_date between r_PET_unique.information2 and r_PET_unique.information3 then
16512: l_update := true;
16513: 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)
16514: 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'
16515: then
16516: 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' ;
16517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16518: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16512: l_update := true;
16513: 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)
16514: 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'
16515: then
16516: 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' ;
16517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16518: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16519: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16520: 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;
16513: 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)
16514: 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'
16515: then
16516: 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' ;
16517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16518: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16519: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16520: 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;
16521: --
16514: 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'
16515: then
16516: 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' ;
16517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16518: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16519: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16520: 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;
16521: --
16522: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16515: then
16516: 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' ;
16517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16518: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16519: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16520: 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;
16521: --
16522: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16523: --
16516: 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' ;
16517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16518: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16519: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16520: 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;
16521: --
16522: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16523: --
16524: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16520: 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;
16521: --
16522: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16523: --
16524: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16525: --
16526: --DOUBT log_data('PET',l_new_value,l_prefix || r_PET_unique.name|| l_suffix,'REUSED');
16527: --
16528: end if ;
16541: open c_PET_min_max_dates(r_PET_unique.table_route_id, r_PET_unique.information1 ) ;
16542: fetch c_PET_min_max_dates into l_min_esd,l_max_eed ;
16543: --
16544:
16545: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16546: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16547: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16548: end if;
16549: l_min_esd := greatest(l_min_esd,r_PET_unique.information2);
16542: fetch c_PET_min_max_dates into l_min_esd,l_max_eed ;
16543: --
16544:
16545: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16546: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16547: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16548: end if;
16549: l_min_esd := greatest(l_min_esd,r_PET_unique.information2);
16550: /* open c_PET(r_PET_unique.table_route_id,
16543: --
16544:
16545: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16546: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16547: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16548: end if;
16549: l_min_esd := greatest(l_min_esd,r_PET_unique.information2);
16550: /* open c_PET(r_PET_unique.table_route_id,
16551: r_PET_unique.information1,
16572: p_from_date => l_min_esd,
16573: p_to_date => l_max_eed );
16574: if l_dt_rec_found THEN
16575: --END TEMPIK
16576: 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
16577: 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
16578: 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' ;
16579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16573: p_to_date => l_max_eed );
16574: if l_dt_rec_found THEN
16575: --END TEMPIK
16576: 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
16577: 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
16578: 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' ;
16579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16574: if l_dt_rec_found THEN
16575: --END TEMPIK
16576: 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
16577: 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
16578: 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' ;
16579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16582: 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;
16575: --END TEMPIK
16576: 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
16577: 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
16578: 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' ;
16579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16582: 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;
16583: --
16576: 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
16577: 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
16578: 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' ;
16579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16582: 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;
16583: --
16584: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16577: 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
16578: 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' ;
16579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16582: 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;
16583: --
16584: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16585: --
16578: 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' ;
16579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16582: 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;
16583: --
16584: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16585: --
16586: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16582: 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;
16583: --
16584: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16585: --
16586: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16587: end if ;
16588: --
16582: 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;
16583: --
16584: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16585: --
16586: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16587: end if ;
16588: --
16589: l_object_found_in_target := true ;
16590: --TEMPIK
16617: end if ;
16618: --
16619:
16620: l_effective_date := r_PET.information2;
16621: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16622: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16623: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16624: end if;
16625:
16618: --
16619:
16620: l_effective_date := r_PET.information2;
16621: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16622: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16623: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16624: end if;
16625:
16626: if l_first_rec and not l_update then
16619:
16620: l_effective_date := r_PET.information2;
16621: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16622: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16623: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16624: end if;
16625:
16626: if l_first_rec and not l_update then
16627: -- Call Create routine.
16675: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
16676: -- Update all relevent cer records with new pk_id
16677: hr_utility.set_location('Before plsql table ',222);
16678: hr_utility.set_location('new_value id '||l_popl_enrt_typ_cycl_id,222);
16679: 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' ;
16680: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16681: 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 ;
16682: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16683: 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;
16676: -- Update all relevent cer records with new pk_id
16677: hr_utility.set_location('Before plsql table ',222);
16678: hr_utility.set_location('new_value id '||l_popl_enrt_typ_cycl_id,222);
16679: 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' ;
16680: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16681: 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 ;
16682: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16683: 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;
16684: hr_utility.set_location('After plsql table ',222);
16677: hr_utility.set_location('Before plsql table ',222);
16678: hr_utility.set_location('new_value id '||l_popl_enrt_typ_cycl_id,222);
16679: 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' ;
16680: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16681: 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 ;
16682: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16683: 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;
16684: hr_utility.set_location('After plsql table ',222);
16685: --
16678: hr_utility.set_location('new_value id '||l_popl_enrt_typ_cycl_id,222);
16679: 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' ;
16680: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16681: 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 ;
16682: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16683: 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;
16684: hr_utility.set_location('After plsql table ',222);
16685: --
16686: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16679: 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' ;
16680: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16681: 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 ;
16682: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16683: 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;
16684: hr_utility.set_location('After plsql table ',222);
16685: --
16686: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16687: --
16682: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16683: 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;
16684: hr_utility.set_location('After plsql table ',222);
16685: --
16686: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16687: --
16688: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16689: --
16690: else
16684: hr_utility.set_location('After plsql table ',222);
16685: --
16686: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16687: --
16688: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16689: --
16690: else
16691: --
16692: -- Call Update routine for the pk_id created in prev run .
16797: end loop;
16798: --
16799: exception when others then
16800: --
16801: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PET',r_pet.information5 );
16802: --
16803: end create_PET_rows;
16804:
16805: --
16958: l_YR_PERD_ID := get_fk('YR_PERD_ID', r_ENP.INFORMATION240,l_dml_operation);
16959:
16960:
16961:
16962: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
16963: l_POS_STRUCTURE_VERSION_ID := r_ENP.information176 ;
16964: else
16965: l_POS_STRUCTURE_VERSION_ID := r_ENP.information174 ;
16966: end if;
16972: --
16973: if l_dml_operation = 'UPDATE' then
16974: --
16975: l_update := true;
16976: 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
16977: 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
16978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
16979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
16980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
16973: if l_dml_operation = 'UPDATE' then
16974: --
16975: l_update := true;
16976: 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
16977: 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
16978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
16979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
16980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
16981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16974: --
16975: l_update := true;
16976: 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
16977: 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
16978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
16979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
16980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
16981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16982: 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;
16975: l_update := true;
16976: 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
16977: 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
16978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
16979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
16980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
16981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16982: 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;
16983: --
16976: 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
16977: 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
16978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
16979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
16980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
16981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16982: 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;
16983: --
16984: -- update_cer_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
16977: 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
16978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
16979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
16980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
16981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16982: 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;
16983: --
16984: -- update_cer_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
16985: --
16978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
16979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
16980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
16981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16982: 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;
16983: --
16984: -- update_cer_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
16985: --
16986: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
16981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16982: 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;
16983: --
16984: -- update_cer_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
16985: --
16986: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16987: --
16988: --DOUBT log_data('ENP',l_new_value,l_prefix || r_ENP_unique.name|| l_suffix,'REUSED');
16982: 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;
16983: --
16984: -- update_cer_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
16985: --
16986: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16987: --
16988: --DOUBT log_data('ENP',l_new_value,l_prefix || r_ENP_unique.name|| l_suffix,'REUSED');
16989: --
16990: end if ;
17001: p_target_business_group_id, nvl(l_enrt_perd_id, -999) ) ;
17002: fetch c_find_ENP_in_target into l_new_value ;
17003: if c_find_ENP_in_target%found then
17004: --
17005: 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
17006: 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
17007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17002: fetch c_find_ENP_in_target into l_new_value ;
17003: if c_find_ENP_in_target%found then
17004: --
17005: 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
17006: 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
17007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17003: if c_find_ENP_in_target%found then
17004: --
17005: 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
17006: 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
17007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17011: 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;
17004: --
17005: 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
17006: 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
17007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17011: 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;
17012: --
17005: 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
17006: 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
17007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17011: 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;
17012: --
17013: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17006: 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
17007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17011: 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;
17012: --
17013: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17014: --
17007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17011: 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;
17012: --
17013: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17014: --
17015: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17011: 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;
17012: --
17013: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17014: --
17015: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17016: end if ;
17017: --
17011: 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;
17012: --
17013: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17014: --
17015: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17016: end if ;
17017: --
17018: l_object_found_in_target := true ;
17019: end if;
17041: end if ;
17042: --
17043:
17044: l_parent_effective_start_date := r_ENP.information10;
17045: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
17046: if l_parent_effective_start_date is null then
17047: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17048: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
17049: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17043:
17044: l_parent_effective_start_date := r_ENP.information10;
17045: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
17046: if l_parent_effective_start_date is null then
17047: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17048: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
17049: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17050: end if;
17051: end if;
17044: l_parent_effective_start_date := r_ENP.information10;
17045: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
17046: if l_parent_effective_start_date is null then
17047: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17048: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
17049: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17050: end if;
17051: end if;
17052: --
17045: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
17046: if l_parent_effective_start_date is null then
17047: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17048: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
17049: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17050: end if;
17051: end if;
17052: --
17053: -- To avoid creating a child with out a parent
17149: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
17150: -- Update all relevent cer records with new pk_id
17151: hr_utility.set_location('Before plsql table ',222);
17152: hr_utility.set_location('new_value id '||l_enrt_perd_id,222);
17153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17157: 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;
17150: -- Update all relevent cer records with new pk_id
17151: hr_utility.set_location('Before plsql table ',222);
17152: hr_utility.set_location('new_value id '||l_enrt_perd_id,222);
17153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17157: 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;
17158: hr_utility.set_location('After plsql table ',222);
17151: hr_utility.set_location('Before plsql table ',222);
17152: hr_utility.set_location('new_value id '||l_enrt_perd_id,222);
17153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17157: 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;
17158: hr_utility.set_location('After plsql table ',222);
17159: --
17152: hr_utility.set_location('new_value id '||l_enrt_perd_id,222);
17153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17157: 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;
17158: hr_utility.set_location('After plsql table ',222);
17159: --
17160: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17157: 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;
17158: hr_utility.set_location('After plsql table ',222);
17159: --
17160: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17161: --
17156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17157: 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;
17158: hr_utility.set_location('After plsql table ',222);
17159: --
17160: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17161: --
17162: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17163: --
17164: elsif l_update then
17158: hr_utility.set_location('After plsql table ',222);
17159: --
17160: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17161: --
17162: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17163: --
17164: elsif l_update then
17165: BEN_ENROLLMENT_PERIOD_API.UPDATE_ENROLLMENT_PERIOD(
17166: --
17262: end loop;
17263: --
17264: exception when others then
17265: --
17266: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ENP',r_enp.information5 );
17267: --
17268: end create_ENP_rows;
17269:
17270: --
17408: end if ;
17409: -- End Prefix Sufix derivation
17410: for r_LEN_unique in c_unique_LEN('LEN') loop
17411:
17412: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17413: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17414: r_LEN_unique.information3 >=
17415: ben_pd_copy_to_ben_one.g_copy_effective_date)
17416: ) then
17409: -- End Prefix Sufix derivation
17410: for r_LEN_unique in c_unique_LEN('LEN') loop
17411:
17412: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17413: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17414: r_LEN_unique.information3 >=
17415: ben_pd_copy_to_ben_one.g_copy_effective_date)
17416: ) then
17417: --
17411:
17412: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17413: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17414: r_LEN_unique.information3 >=
17415: ben_pd_copy_to_ben_one.g_copy_effective_date)
17416: ) then
17417: --
17418: hr_utility.set_location(' r_LEN_unique.table_route_id '||r_LEN_unique.table_route_id,10);
17419: hr_utility.set_location(' r_LEN_unique.information1 '||r_LEN_unique.information1,10);
17450: l_object_found_in_target := TRUE;
17451: --
17452: if l_process_date between r_LEN_unique.information2 and r_LEN_unique.information3 then
17453: l_update := true;
17454: 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)
17455: 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'
17456: then
17457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17451: --
17452: if l_process_date between r_LEN_unique.information2 and r_LEN_unique.information3 then
17453: l_update := true;
17454: 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)
17455: 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'
17456: then
17457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17453: l_update := true;
17454: 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)
17455: 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'
17456: then
17457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17461: 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;
17454: 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)
17455: 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'
17456: then
17457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17461: 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;
17462: --
17455: 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'
17456: then
17457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17461: 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;
17462: --
17463: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17456: then
17457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17461: 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;
17462: --
17463: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17464: --
17457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17461: 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;
17462: --
17463: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17464: --
17465: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17461: 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;
17462: --
17463: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17464: --
17465: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17466: --
17467: --DOUBT log_data('LEN',l_new_value,l_prefix || r_LEN_unique.name|| l_suffix,'REUSED');
17468: --
17469: end if ;
17482: open c_LEN_min_max_dates(r_LEN_unique.table_route_id, r_LEN_unique.information1 ) ;
17483: fetch c_LEN_min_max_dates into l_min_esd,l_max_eed ;
17484: --
17485:
17486: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17487: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17488: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17489: end if;
17490: l_min_esd := greatest(l_min_esd,r_LEN_unique.information2);
17483: fetch c_LEN_min_max_dates into l_min_esd,l_max_eed ;
17484: --
17485:
17486: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17487: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17488: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17489: end if;
17490: l_min_esd := greatest(l_min_esd,r_LEN_unique.information2);
17491: /* open c_LEN(r_LEN_unique.table_route_id,
17484: --
17485:
17486: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17487: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17488: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17489: end if;
17490: l_min_esd := greatest(l_min_esd,r_LEN_unique.information2);
17491: /* open c_LEN(r_LEN_unique.table_route_id,
17492: r_LEN_unique.information1,
17514: p_from_date => l_min_esd,
17515: p_to_date => l_max_eed );
17516: if l_dt_rec_found THEN
17517: --END TEMPIK
17518: 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
17519: 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
17520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17515: p_to_date => l_max_eed );
17516: if l_dt_rec_found THEN
17517: --END TEMPIK
17518: 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
17519: 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
17520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17516: if l_dt_rec_found THEN
17517: --END TEMPIK
17518: 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
17519: 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
17520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17524: 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;
17517: --END TEMPIK
17518: 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
17519: 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
17520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17524: 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;
17525: --
17518: 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
17519: 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
17520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17524: 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;
17525: --
17526: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17519: 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
17520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17524: 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;
17525: --
17526: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17527: --
17520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17524: 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;
17525: --
17526: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17527: --
17528: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17524: 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;
17525: --
17526: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17527: --
17528: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17529: end if ;
17530: --
17524: 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;
17525: --
17526: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17527: --
17528: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17529: end if ;
17530: --
17531: l_object_found_in_target := true ;
17532: --TEMPIK
17559: end if ;
17560: --
17561:
17562: l_effective_date := r_LEN.information2;
17563: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17564: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17565: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17566: end if;
17567:
17560: --
17561:
17562: l_effective_date := r_LEN.information2;
17563: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17564: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17565: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17566: end if;
17567:
17568: if l_first_rec and not l_update then
17561:
17562: l_effective_date := r_LEN.information2;
17563: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17564: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17565: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17566: end if;
17567:
17568: if l_first_rec and not l_update then
17569: -- Call Create routine.
17640: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
17641: -- Update all relevent cer records with new pk_id
17642: hr_utility.set_location('Before plsql table ',222);
17643: hr_utility.set_location('new_value id '||l_lee_rsn_id,222);
17644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17648: 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;
17641: -- Update all relevent cer records with new pk_id
17642: hr_utility.set_location('Before plsql table ',222);
17643: hr_utility.set_location('new_value id '||l_lee_rsn_id,222);
17644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17648: 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;
17649: hr_utility.set_location('After plsql table ',222);
17642: hr_utility.set_location('Before plsql table ',222);
17643: hr_utility.set_location('new_value id '||l_lee_rsn_id,222);
17644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17648: 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;
17649: hr_utility.set_location('After plsql table ',222);
17650: --
17643: hr_utility.set_location('new_value id '||l_lee_rsn_id,222);
17644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17648: 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;
17649: hr_utility.set_location('After plsql table ',222);
17650: --
17651: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17648: 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;
17649: hr_utility.set_location('After plsql table ',222);
17650: --
17651: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17652: --
17647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17648: 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;
17649: hr_utility.set_location('After plsql table ',222);
17650: --
17651: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17652: --
17653: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17654: --
17655: else
17649: hr_utility.set_location('After plsql table ',222);
17650: --
17651: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17652: --
17653: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17654: --
17655: else
17656: --
17657: -- Call Update routine for the pk_id created in prev run .
17783: end loop;
17784: --
17785: exception when others then
17786: --
17787: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LEN',r_len.information5 );
17788: --
17789: end create_LEN_rows;
17790:
17791: --
17933: end if ;
17934: -- End Prefix Sufix derivation
17935: for r_ERP_unique in c_unique_ERP('ERP') loop
17936:
17937: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17938: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17939: r_ERP_unique.information3 >=
17940: ben_pd_copy_to_ben_one.g_copy_effective_date)
17941: ) then
17934: -- End Prefix Sufix derivation
17935: for r_ERP_unique in c_unique_ERP('ERP') loop
17936:
17937: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17938: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17939: r_ERP_unique.information3 >=
17940: ben_pd_copy_to_ben_one.g_copy_effective_date)
17941: ) then
17942: --
17936:
17937: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17938: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17939: r_ERP_unique.information3 >=
17940: ben_pd_copy_to_ben_one.g_copy_effective_date)
17941: ) then
17942: --
17943: hr_utility.set_location(' r_ERP_unique.table_route_id '||r_ERP_unique.table_route_id,10);
17944: hr_utility.set_location(' r_ERP_unique.information1 '||r_ERP_unique.information1,10);
17976: l_object_found_in_target := TRUE;
17977: --
17978: if l_process_date between r_ERP_unique.information2 and r_ERP_unique.information3 then
17979: l_update := true;
17980: 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)
17981: 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'
17982: then
17983: 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' ;
17984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
17977: --
17978: if l_process_date between r_ERP_unique.information2 and r_ERP_unique.information3 then
17979: l_update := true;
17980: 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)
17981: 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'
17982: then
17983: 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' ;
17984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
17985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
17979: l_update := true;
17980: 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)
17981: 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'
17982: then
17983: 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' ;
17984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
17985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
17986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17987: 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;
17980: 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)
17981: 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'
17982: then
17983: 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' ;
17984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
17985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
17986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17987: 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;
17988: --
17981: 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'
17982: then
17983: 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' ;
17984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
17985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
17986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17987: 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;
17988: --
17989: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17982: then
17983: 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' ;
17984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
17985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
17986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17987: 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;
17988: --
17989: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17990: --
17983: 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' ;
17984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
17985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
17986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17987: 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;
17988: --
17989: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17990: --
17991: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17987: 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;
17988: --
17989: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17990: --
17991: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17992: --
17993: --DOUBT log_data('ERP',l_new_value,l_prefix || r_ERP_unique.name|| l_suffix,'REUSED');
17994: --
17995: end if ;
18008: open c_ERP_min_max_dates(r_ERP_unique.table_route_id, r_ERP_unique.information1 ) ;
18009: fetch c_ERP_min_max_dates into l_min_esd,l_max_eed ;
18010: --
18011:
18012: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18013: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18014: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18015: end if;
18016: l_min_esd := greatest(l_min_esd,r_ERP_unique.information2);
18009: fetch c_ERP_min_max_dates into l_min_esd,l_max_eed ;
18010: --
18011:
18012: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18013: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18014: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18015: end if;
18016: l_min_esd := greatest(l_min_esd,r_ERP_unique.information2);
18017: /* open c_ERP(r_ERP_unique.table_route_id,
18010: --
18011:
18012: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18013: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18014: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18015: end if;
18016: l_min_esd := greatest(l_min_esd,r_ERP_unique.information2);
18017: /* open c_ERP(r_ERP_unique.table_route_id,
18018: r_ERP_unique.information1,
18040: p_from_date => l_min_esd,
18041: p_to_date => l_max_eed );
18042: if l_dt_rec_found THEN
18043: --END TEMPIK
18044: 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
18045: 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
18046: 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' ;
18047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18041: p_to_date => l_max_eed );
18042: if l_dt_rec_found THEN
18043: --END TEMPIK
18044: 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
18045: 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
18046: 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' ;
18047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18049: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18042: if l_dt_rec_found THEN
18043: --END TEMPIK
18044: 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
18045: 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
18046: 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' ;
18047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18049: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18050: 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;
18043: --END TEMPIK
18044: 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
18045: 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
18046: 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' ;
18047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18049: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18050: 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;
18051: --
18044: 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
18045: 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
18046: 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' ;
18047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18049: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18050: 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;
18051: --
18052: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18045: 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
18046: 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' ;
18047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18049: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18050: 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;
18051: --
18052: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18053: --
18046: 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' ;
18047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18049: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18050: 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;
18051: --
18052: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18053: --
18054: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18049: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18050: 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;
18051: --
18052: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18053: --
18054: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18055: end if ;
18056: --
18050: 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;
18051: --
18052: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18053: --
18054: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18055: end if ;
18056: --
18057: l_object_found_in_target := true ;
18058: --TEMPIK
18085: end if ;
18086: --
18087:
18088: l_effective_date := r_ERP.information2;
18089: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18090: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18091: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18092: end if;
18093:
18086: --
18087:
18088: l_effective_date := r_ERP.information2;
18089: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18090: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18091: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18092: end if;
18093:
18094: if l_first_rec and not l_update then
18087:
18088: l_effective_date := r_ERP.information2;
18089: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18090: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18091: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18092: end if;
18093:
18094: if l_first_rec and not l_update then
18095: -- Call Create routine.
18151: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
18152: -- Update all relevent cer records with new pk_id
18153: hr_utility.set_location('Before plsql table ',222);
18154: hr_utility.set_location('new_value id '||l_enrt_perd_for_pl_id,222);
18155: 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' ;
18156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18157: 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 ;
18158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18159: 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;
18152: -- Update all relevent cer records with new pk_id
18153: hr_utility.set_location('Before plsql table ',222);
18154: hr_utility.set_location('new_value id '||l_enrt_perd_for_pl_id,222);
18155: 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' ;
18156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18157: 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 ;
18158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18159: 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;
18160: hr_utility.set_location('After plsql table ',222);
18153: hr_utility.set_location('Before plsql table ',222);
18154: hr_utility.set_location('new_value id '||l_enrt_perd_for_pl_id,222);
18155: 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' ;
18156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18157: 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 ;
18158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18159: 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;
18160: hr_utility.set_location('After plsql table ',222);
18161: --
18154: hr_utility.set_location('new_value id '||l_enrt_perd_for_pl_id,222);
18155: 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' ;
18156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18157: 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 ;
18158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18159: 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;
18160: hr_utility.set_location('After plsql table ',222);
18161: --
18162: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18155: 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' ;
18156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18157: 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 ;
18158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18159: 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;
18160: hr_utility.set_location('After plsql table ',222);
18161: --
18162: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18163: --
18158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18159: 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;
18160: hr_utility.set_location('After plsql table ',222);
18161: --
18162: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18163: --
18164: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18165: --
18166: else
18160: hr_utility.set_location('After plsql table ',222);
18161: --
18162: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18163: --
18164: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18165: --
18166: else
18167: --
18168: -- Call Update routine for the pk_id created in prev run .
18281: end loop;
18282: --
18283: exception when others then
18284: --
18285: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ERP',r_erp.information5 );
18286: --
18287: end create_ERP_rows;
18288:
18289: --
18421: end if ;
18422: -- End Prefix Sufix derivation
18423: for r_SER_unique in c_unique_SER('SER') loop
18424:
18425: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18426: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18427: r_SER_unique.information3 >=
18428: ben_pd_copy_to_ben_one.g_copy_effective_date)
18429: ) then
18422: -- End Prefix Sufix derivation
18423: for r_SER_unique in c_unique_SER('SER') loop
18424:
18425: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18426: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18427: r_SER_unique.information3 >=
18428: ben_pd_copy_to_ben_one.g_copy_effective_date)
18429: ) then
18430: --
18424:
18425: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18426: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18427: r_SER_unique.information3 >=
18428: ben_pd_copy_to_ben_one.g_copy_effective_date)
18429: ) then
18430: --
18431: hr_utility.set_location(' r_SER_unique.table_route_id '||r_SER_unique.table_route_id,10);
18432: hr_utility.set_location(' r_SER_unique.information1 '||r_SER_unique.information1,10);
18457: l_object_found_in_target := TRUE;
18458: --
18459: if l_process_date between r_SER_unique.information2 and r_SER_unique.information3 then
18460: l_update := true;
18461: 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)
18462: 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'
18463: then
18464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18458: --
18459: if l_process_date between r_SER_unique.information2 and r_SER_unique.information3 then
18460: l_update := true;
18461: 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)
18462: 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'
18463: then
18464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18460: l_update := true;
18461: 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)
18462: 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'
18463: then
18464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18468: 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;
18461: 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)
18462: 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'
18463: then
18464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18468: 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;
18469: --
18462: 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'
18463: then
18464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18468: 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;
18469: --
18470: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18463: then
18464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18468: 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;
18469: --
18470: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18471: --
18464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18468: 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;
18469: --
18470: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18471: --
18472: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18468: 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;
18469: --
18470: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18471: --
18472: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18473: --
18474: --DOUBT log_data('SER',l_new_value,l_prefix || r_SER_unique.name|| l_suffix,'REUSED');
18475: --
18476: end if ;
18489: open c_SER_min_max_dates(r_SER_unique.table_route_id, r_SER_unique.information1 ) ;
18490: fetch c_SER_min_max_dates into l_min_esd,l_max_eed ;
18491: --
18492:
18493: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18494: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18495: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18496: end if;
18497: l_min_esd := greatest(l_min_esd,r_SER_unique.information2);
18490: fetch c_SER_min_max_dates into l_min_esd,l_max_eed ;
18491: --
18492:
18493: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18494: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18495: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18496: end if;
18497: l_min_esd := greatest(l_min_esd,r_SER_unique.information2);
18498: /* open c_SER(r_SER_unique.table_route_id,
18491: --
18492:
18493: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18494: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18495: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18496: end if;
18497: l_min_esd := greatest(l_min_esd,r_SER_unique.information2);
18498: /* open c_SER(r_SER_unique.table_route_id,
18499: r_SER_unique.information1,
18520: p_from_date => l_min_esd,
18521: p_to_date => l_max_eed );
18522: if l_dt_rec_found THEN
18523: --END TEMPIK
18524: 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
18525: 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
18526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18521: p_to_date => l_max_eed );
18522: if l_dt_rec_found THEN
18523: --END TEMPIK
18524: 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
18525: 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
18526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18522: if l_dt_rec_found THEN
18523: --END TEMPIK
18524: 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
18525: 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
18526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18530: 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;
18523: --END TEMPIK
18524: 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
18525: 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
18526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18530: 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;
18531: --
18524: 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
18525: 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
18526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18530: 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;
18531: --
18532: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18525: 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
18526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18530: 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;
18531: --
18532: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18533: --
18526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18530: 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;
18531: --
18532: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18533: --
18534: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18530: 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;
18531: --
18532: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18533: --
18534: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18535: end if ;
18536: --
18530: 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;
18531: --
18532: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18533: --
18534: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18535: end if ;
18536: --
18537: l_object_found_in_target := true ;
18538: --TEMPIK
18565: end if ;
18566: --
18567:
18568: l_effective_date := r_SER.information2;
18569: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18570: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18571: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18572: end if;
18573:
18566: --
18567:
18568: l_effective_date := r_SER.information2;
18569: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18570: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18571: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18572: end if;
18573:
18574: if l_first_rec and not l_update then
18567:
18568: l_effective_date := r_SER.information2;
18569: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18570: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18571: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18572: end if;
18573:
18574: if l_first_rec and not l_update then
18575: -- Call Create routine.
18623: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
18624: -- Update all relevent cer records with new pk_id
18625: hr_utility.set_location('Before plsql table ',222);
18626: hr_utility.set_location('new_value id '||l_schedd_enrt_rl_id,222);
18627: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18628: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18629: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18630: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18631: 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;
18624: -- Update all relevent cer records with new pk_id
18625: hr_utility.set_location('Before plsql table ',222);
18626: hr_utility.set_location('new_value id '||l_schedd_enrt_rl_id,222);
18627: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18628: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18629: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18630: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18631: 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;
18632: hr_utility.set_location('After plsql table ',222);
18625: hr_utility.set_location('Before plsql table ',222);
18626: hr_utility.set_location('new_value id '||l_schedd_enrt_rl_id,222);
18627: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18628: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18629: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18630: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18631: 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;
18632: hr_utility.set_location('After plsql table ',222);
18633: --
18626: hr_utility.set_location('new_value id '||l_schedd_enrt_rl_id,222);
18627: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18628: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18629: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18630: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18631: 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;
18632: hr_utility.set_location('After plsql table ',222);
18633: --
18634: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18627: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18628: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18629: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18630: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18631: 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;
18632: hr_utility.set_location('After plsql table ',222);
18633: --
18634: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18635: --
18630: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18631: 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;
18632: hr_utility.set_location('After plsql table ',222);
18633: --
18634: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18635: --
18636: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18637: --
18638: else
18632: hr_utility.set_location('After plsql table ',222);
18633: --
18634: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18635: --
18636: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18637: --
18638: else
18639: --
18640: -- Call Update routine for the pk_id created in prev run .
18745: end loop;
18746: --
18747: exception when others then
18748: --
18749: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'SER',r_ser.information5 );
18750: --
18751: end create_SER_rows;
18752: --
18753: ---------------------------------------------------------------
18884: end if ;
18885: -- End Prefix Sufix derivation
18886: for r_LRR_unique in c_unique_LRR('LRR') loop
18887:
18888: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18889: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18890: r_LRR_unique.information3 >=
18891: ben_pd_copy_to_ben_one.g_copy_effective_date)
18892: ) then
18885: -- End Prefix Sufix derivation
18886: for r_LRR_unique in c_unique_LRR('LRR') loop
18887:
18888: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18889: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18890: r_LRR_unique.information3 >=
18891: ben_pd_copy_to_ben_one.g_copy_effective_date)
18892: ) then
18893: --
18887:
18888: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18889: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18890: r_LRR_unique.information3 >=
18891: ben_pd_copy_to_ben_one.g_copy_effective_date)
18892: ) then
18893: --
18894: hr_utility.set_location(' r_LRR_unique.table_route_id '||r_LRR_unique.table_route_id,10);
18895: hr_utility.set_location(' r_LRR_unique.information1 '||r_LRR_unique.information1,10);
18920: l_object_found_in_target := TRUE;
18921: --
18922: if l_process_date between r_LRR_unique.information2 and r_LRR_unique.information3 then
18923: l_update := true;
18924: 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)
18925: 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'
18926: then
18927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18921: --
18922: if l_process_date between r_LRR_unique.information2 and r_LRR_unique.information3 then
18923: l_update := true;
18924: 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)
18925: 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'
18926: then
18927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
18923: l_update := true;
18924: 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)
18925: 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'
18926: then
18927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
18930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18931: 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;
18924: 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)
18925: 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'
18926: then
18927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
18930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18931: 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;
18932: --
18925: 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'
18926: then
18927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
18930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18931: 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;
18932: --
18933: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18926: then
18927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
18930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18931: 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;
18932: --
18933: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18934: --
18927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
18930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18931: 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;
18932: --
18933: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18934: --
18935: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18931: 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;
18932: --
18933: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18934: --
18935: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18936: --
18937: --DOUBT log_data('LRR',l_new_value,l_prefix || r_LRR_unique.name|| l_suffix,'REUSED');
18938: --
18939: end if ;
18952: open c_LRR_min_max_dates(r_LRR_unique.table_route_id, r_LRR_unique.information1 ) ;
18953: fetch c_LRR_min_max_dates into l_min_esd,l_max_eed ;
18954: --
18955:
18956: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18957: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18958: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18959: end if;
18960: l_min_esd := greatest(l_min_esd,r_LRR_unique.information2);
18953: fetch c_LRR_min_max_dates into l_min_esd,l_max_eed ;
18954: --
18955:
18956: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18957: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18958: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18959: end if;
18960: l_min_esd := greatest(l_min_esd,r_LRR_unique.information2);
18961: /* open c_LRR(r_LRR_unique.table_route_id,
18954: --
18955:
18956: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18957: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18958: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18959: end if;
18960: l_min_esd := greatest(l_min_esd,r_LRR_unique.information2);
18961: /* open c_LRR(r_LRR_unique.table_route_id,
18962: r_LRR_unique.information1,
18983: p_from_date => l_min_esd,
18984: p_to_date => l_max_eed );
18985: if l_dt_rec_found THEN
18986: --END TEMPIK
18987: 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
18988: 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
18989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18984: p_to_date => l_max_eed );
18985: if l_dt_rec_found THEN
18986: --END TEMPIK
18987: 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
18988: 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
18989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18992: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18985: if l_dt_rec_found THEN
18986: --END TEMPIK
18987: 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
18988: 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
18989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18992: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18993: 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;
18986: --END TEMPIK
18987: 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
18988: 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
18989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18992: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18993: 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;
18994: --
18987: 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
18988: 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
18989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18992: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18993: 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;
18994: --
18995: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18988: 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
18989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18992: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18993: 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;
18994: --
18995: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18996: --
18989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
18990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
18991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18992: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18993: 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;
18994: --
18995: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18996: --
18997: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18992: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18993: 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;
18994: --
18995: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18996: --
18997: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18998: end if ;
18999: --
18993: 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;
18994: --
18995: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18996: --
18997: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18998: end if ;
18999: --
19000: l_object_found_in_target := true ;
19001: --TEMPIK
19028: end if ;
19029: --
19030:
19031: l_effective_date := r_LRR.information2;
19032: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19033: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19034: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19035: end if;
19036:
19029: --
19030:
19031: l_effective_date := r_LRR.information2;
19032: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19033: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19034: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19035: end if;
19036:
19037: if l_first_rec and not l_update then
19030:
19031: l_effective_date := r_LRR.information2;
19032: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19033: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19034: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19035: end if;
19036:
19037: if l_first_rec and not l_update then
19038: -- Call Create routine.
19086: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
19087: -- Update all relevent cer records with new pk_id
19088: hr_utility.set_location('Before plsql table ',222);
19089: hr_utility.set_location('new_value id '||l_lee_rsn_rl_id,222);
19090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19094: 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;
19087: -- Update all relevent cer records with new pk_id
19088: hr_utility.set_location('Before plsql table ',222);
19089: hr_utility.set_location('new_value id '||l_lee_rsn_rl_id,222);
19090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19094: 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;
19095: hr_utility.set_location('After plsql table ',222);
19088: hr_utility.set_location('Before plsql table ',222);
19089: hr_utility.set_location('new_value id '||l_lee_rsn_rl_id,222);
19090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19094: 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;
19095: hr_utility.set_location('After plsql table ',222);
19096: --
19089: hr_utility.set_location('new_value id '||l_lee_rsn_rl_id,222);
19090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19094: 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;
19095: hr_utility.set_location('After plsql table ',222);
19096: --
19097: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19094: 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;
19095: hr_utility.set_location('After plsql table ',222);
19096: --
19097: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19098: --
19093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19094: 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;
19095: hr_utility.set_location('After plsql table ',222);
19096: --
19097: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19098: --
19099: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19100: --
19101: else
19095: hr_utility.set_location('After plsql table ',222);
19096: --
19097: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19098: --
19099: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19100: --
19101: else
19102: --
19103: -- Call Update routine for the pk_id created in prev run .
19207: end loop;
19208: --
19209: exception when others then
19210: --
19211: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LRR',r_lrr.information5 );
19212: --
19213: end create_LRR_rows;
19214:
19215: ---------------------------------------------------------------
19355: end if ;
19356: -- End Prefix Sufix derivation
19357: for r_ADE_unique in c_unique_ADE('ADE') loop
19358:
19359: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19360: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19361: r_ADE_unique.information3 >=
19362: ben_pd_copy_to_ben_one.g_copy_effective_date)
19363: ) then
19356: -- End Prefix Sufix derivation
19357: for r_ADE_unique in c_unique_ADE('ADE') loop
19358:
19359: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19360: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19361: r_ADE_unique.information3 >=
19362: ben_pd_copy_to_ben_one.g_copy_effective_date)
19363: ) then
19364: --
19358:
19359: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19360: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19361: r_ADE_unique.information3 >=
19362: ben_pd_copy_to_ben_one.g_copy_effective_date)
19363: ) then
19364: --
19365: hr_utility.set_location(' r_ADE_unique.table_route_id '||r_ADE_unique.table_route_id,10);
19366: hr_utility.set_location(' r_ADE_unique.information1 '||r_ADE_unique.information1,10);
19394: l_object_found_in_target := TRUE;
19395: --
19396: if l_process_date between r_ADE_unique.information2 and r_ADE_unique.information3 then
19397: l_update := true;
19398: 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)
19399: 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'
19400: then
19401: 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' ;
19402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19395: --
19396: if l_process_date between r_ADE_unique.information2 and r_ADE_unique.information3 then
19397: l_update := true;
19398: 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)
19399: 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'
19400: then
19401: 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' ;
19402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19397: l_update := true;
19398: 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)
19399: 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'
19400: then
19401: 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' ;
19402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19405: 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;
19398: 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)
19399: 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'
19400: then
19401: 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' ;
19402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19405: 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;
19406: --
19399: 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'
19400: then
19401: 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' ;
19402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19405: 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;
19406: --
19407: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19400: then
19401: 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' ;
19402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19405: 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;
19406: --
19407: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19408: --
19401: 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' ;
19402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19405: 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;
19406: --
19407: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19408: --
19409: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19405: 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;
19406: --
19407: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19408: --
19409: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19410: --
19411: --DOUBT log_data('ADE',l_new_value,l_prefix || r_ADE_unique.name|| l_suffix,'REUSED');
19412: --
19413: end if ;
19426: open c_ADE_min_max_dates(r_ADE_unique.table_route_id, r_ADE_unique.information1 ) ;
19427: fetch c_ADE_min_max_dates into l_min_esd,l_max_eed ;
19428: --
19429:
19430: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19431: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19432: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19433: end if;
19434: l_min_esd := greatest(l_min_esd,r_ADE_unique.information2);
19427: fetch c_ADE_min_max_dates into l_min_esd,l_max_eed ;
19428: --
19429:
19430: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19431: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19432: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19433: end if;
19434: l_min_esd := greatest(l_min_esd,r_ADE_unique.information2);
19435: /* open c_ADE(r_ADE_unique.table_route_id,
19428: --
19429:
19430: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19431: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19432: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19433: end if;
19434: l_min_esd := greatest(l_min_esd,r_ADE_unique.information2);
19435: /* open c_ADE(r_ADE_unique.table_route_id,
19436: r_ADE_unique.information1,
19457: p_from_date => l_min_esd,
19458: p_to_date => l_max_eed );
19459: if l_dt_rec_found THEN
19460: --END TEMPIK
19461: 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
19462: 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
19463: 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' ;
19464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19458: p_to_date => l_max_eed );
19459: if l_dt_rec_found THEN
19460: --END TEMPIK
19461: 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
19462: 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
19463: 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' ;
19464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19459: if l_dt_rec_found THEN
19460: --END TEMPIK
19461: 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
19462: 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
19463: 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' ;
19464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19467: 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;
19460: --END TEMPIK
19461: 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
19462: 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
19463: 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' ;
19464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19467: 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;
19468: --
19461: 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
19462: 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
19463: 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' ;
19464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19467: 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;
19468: --
19469: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19462: 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
19463: 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' ;
19464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19467: 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;
19468: --
19469: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19470: --
19463: 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' ;
19464: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19467: 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;
19468: --
19469: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19470: --
19471: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19467: 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;
19468: --
19469: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19470: --
19471: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19472: end if ;
19473: --
19467: 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;
19468: --
19469: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19470: --
19471: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19472: end if ;
19473: --
19474: l_object_found_in_target := true ;
19475: --TEMPIK
19502: end if ;
19503: --
19504:
19505: l_effective_date := r_ADE.information2;
19506: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19507: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19508: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19509: end if;
19510:
19503: --
19504:
19505: l_effective_date := r_ADE.information2;
19506: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19507: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19508: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19509: end if;
19510:
19511: if l_first_rec and not l_update then
19504:
19505: l_effective_date := r_ADE.information2;
19506: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19507: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19508: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19509: end if;
19510:
19511: if l_first_rec and not l_update then
19512: -- Call Create routine.
19563: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
19564: -- Update all relevent cer records with new pk_id
19565: hr_utility.set_location('Before plsql table ',222);
19566: hr_utility.set_location('new_value id '||l_apld_dpnt_cvg_elig_prfl_id,222);
19567: 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' ;
19568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19569: 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 ;
19570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19571: 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;
19564: -- Update all relevent cer records with new pk_id
19565: hr_utility.set_location('Before plsql table ',222);
19566: hr_utility.set_location('new_value id '||l_apld_dpnt_cvg_elig_prfl_id,222);
19567: 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' ;
19568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19569: 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 ;
19570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19571: 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;
19572: hr_utility.set_location('After plsql table ',222);
19565: hr_utility.set_location('Before plsql table ',222);
19566: hr_utility.set_location('new_value id '||l_apld_dpnt_cvg_elig_prfl_id,222);
19567: 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' ;
19568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19569: 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 ;
19570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19571: 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;
19572: hr_utility.set_location('After plsql table ',222);
19573: --
19566: hr_utility.set_location('new_value id '||l_apld_dpnt_cvg_elig_prfl_id,222);
19567: 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' ;
19568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19569: 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 ;
19570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19571: 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;
19572: hr_utility.set_location('After plsql table ',222);
19573: --
19574: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19567: 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' ;
19568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19569: 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 ;
19570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19571: 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;
19572: hr_utility.set_location('After plsql table ',222);
19573: --
19574: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19575: --
19570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19571: 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;
19572: hr_utility.set_location('After plsql table ',222);
19573: --
19574: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19575: --
19576: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19577: --
19578: else
19572: hr_utility.set_location('After plsql table ',222);
19573: --
19574: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19575: --
19576: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19577: --
19578: else
19579: --
19580: -- Call Update routine for the pk_id created in prev run .
19688: end loop;
19689: --
19690: exception when others then
19691: --
19692: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ADE',r_ade.information5 );
19693: --
19694: end create_ADE_rows;
19695:
19696: --
19829: end if ;
19830: -- End Prefix Sufix derivation
19831: for r_PGC_unique in c_unique_PGC('PGC') loop
19832:
19833: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19834: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19835: r_PGC_unique.information3 >=
19836: ben_pd_copy_to_ben_one.g_copy_effective_date)
19837: ) then
19830: -- End Prefix Sufix derivation
19831: for r_PGC_unique in c_unique_PGC('PGC') loop
19832:
19833: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19834: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19835: r_PGC_unique.information3 >=
19836: ben_pd_copy_to_ben_one.g_copy_effective_date)
19837: ) then
19838: --
19832:
19833: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19834: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19835: r_PGC_unique.information3 >=
19836: ben_pd_copy_to_ben_one.g_copy_effective_date)
19837: ) then
19838: --
19839: hr_utility.set_location(' r_PGC_unique.table_route_id '||r_PGC_unique.table_route_id,10);
19840: hr_utility.set_location(' r_PGC_unique.information1 '||r_PGC_unique.information1,10);
19865: l_object_found_in_target := TRUE;
19866: --
19867: if l_process_date between r_PGC_unique.information2 and r_PGC_unique.information3 then
19868: l_update := true;
19869: 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)
19870: 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'
19871: then
19872: 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' ;
19873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19866: --
19867: if l_process_date between r_PGC_unique.information2 and r_PGC_unique.information3 then
19868: l_update := true;
19869: 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)
19870: 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'
19871: then
19872: 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' ;
19873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19868: l_update := true;
19869: 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)
19870: 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'
19871: then
19872: 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' ;
19873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19876: 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;
19869: 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)
19870: 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'
19871: then
19872: 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' ;
19873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19876: 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;
19877: --
19870: 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'
19871: then
19872: 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' ;
19873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19876: 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;
19877: --
19878: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19871: then
19872: 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' ;
19873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19876: 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;
19877: --
19878: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19879: --
19872: 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' ;
19873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19876: 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;
19877: --
19878: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19879: --
19880: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19876: 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;
19877: --
19878: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19879: --
19880: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19881: --
19882: --DOUBT log_data('PGC',l_new_value,l_prefix || r_PGC_unique.name|| l_suffix,'REUSED');
19883: --
19884: end if ;
19897: open c_PGC_min_max_dates(r_PGC_unique.table_route_id, r_PGC_unique.information1 ) ;
19898: fetch c_PGC_min_max_dates into l_min_esd,l_max_eed ;
19899: --
19900:
19901: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19902: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19903: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19904: end if;
19905: l_min_esd := greatest(l_min_esd,r_PGC_unique.information2);
19898: fetch c_PGC_min_max_dates into l_min_esd,l_max_eed ;
19899: --
19900:
19901: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19902: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19903: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19904: end if;
19905: l_min_esd := greatest(l_min_esd,r_PGC_unique.information2);
19906: /* open c_PGC(r_PGC_unique.table_route_id,
19899: --
19900:
19901: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19902: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19903: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19904: end if;
19905: l_min_esd := greatest(l_min_esd,r_PGC_unique.information2);
19906: /* open c_PGC(r_PGC_unique.table_route_id,
19907: r_PGC_unique.information1,
19929: p_from_date => l_min_esd,
19930: p_to_date => l_max_eed );
19931: if l_dt_rec_found THEN
19932: --END TEMPIK
19933: 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
19934: 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
19935: 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' ;
19936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19930: p_to_date => l_max_eed );
19931: if l_dt_rec_found THEN
19932: --END TEMPIK
19933: 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
19934: 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
19935: 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' ;
19936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19931: if l_dt_rec_found THEN
19932: --END TEMPIK
19933: 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
19934: 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
19935: 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' ;
19936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19939: 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;
19932: --END TEMPIK
19933: 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
19934: 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
19935: 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' ;
19936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19939: 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;
19940: --
19933: 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
19934: 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
19935: 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' ;
19936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19939: 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;
19940: --
19941: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19934: 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
19935: 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' ;
19936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19939: 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;
19940: --
19941: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19942: --
19935: 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' ;
19936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19939: 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;
19940: --
19941: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19942: --
19943: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19939: 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;
19940: --
19941: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19942: --
19943: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19944: end if ;
19945: --
19939: 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;
19940: --
19941: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19942: --
19943: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19944: end if ;
19945: --
19946: l_object_found_in_target := true ;
19947: --TEMPIK
19974: end if ;
19975: --
19976:
19977: l_effective_date := r_PGC.information2;
19978: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19979: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19980: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19981: end if;
19982:
19975: --
19976:
19977: l_effective_date := r_PGC.information2;
19978: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19979: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19980: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19981: end if;
19982:
19983: if l_first_rec and not l_update then
19976:
19977: l_effective_date := r_PGC.information2;
19978: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19979: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19980: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19981: end if;
19982:
19983: if l_first_rec and not l_update then
19984: -- Call Create routine.
20036: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
20037: -- Update all relevent cer records with new pk_id
20038: hr_utility.set_location('Before plsql table ',222);
20039: hr_utility.set_location('new_value id '||l_pgm_dpnt_cvg_ctfn_id,222);
20040: 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' ;
20041: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20042: 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 ;
20043: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20044: 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;
20037: -- Update all relevent cer records with new pk_id
20038: hr_utility.set_location('Before plsql table ',222);
20039: hr_utility.set_location('new_value id '||l_pgm_dpnt_cvg_ctfn_id,222);
20040: 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' ;
20041: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20042: 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 ;
20043: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20044: 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;
20045: hr_utility.set_location('After plsql table ',222);
20038: hr_utility.set_location('Before plsql table ',222);
20039: hr_utility.set_location('new_value id '||l_pgm_dpnt_cvg_ctfn_id,222);
20040: 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' ;
20041: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20042: 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 ;
20043: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20044: 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;
20045: hr_utility.set_location('After plsql table ',222);
20046: --
20039: hr_utility.set_location('new_value id '||l_pgm_dpnt_cvg_ctfn_id,222);
20040: 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' ;
20041: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20042: 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 ;
20043: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20044: 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;
20045: hr_utility.set_location('After plsql table ',222);
20046: --
20047: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20040: 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' ;
20041: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20042: 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 ;
20043: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20044: 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;
20045: hr_utility.set_location('After plsql table ',222);
20046: --
20047: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20048: --
20043: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20044: 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;
20045: hr_utility.set_location('After plsql table ',222);
20046: --
20047: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20048: --
20049: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20050: --
20051: else
20045: hr_utility.set_location('After plsql table ',222);
20046: --
20047: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20048: --
20049: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20050: --
20051: else
20052: --
20053: -- Call Update routine for the pk_id created in prev run .
20162: end loop;
20163: --
20164: exception when others then
20165: --
20166: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PGC',r_pgc.information5 );
20167: --
20168: end create_PGC_rows;
20169:
20170: ---------------------------------------------------------------
20304: end if ;
20305: -- End Prefix Sufix derivation
20306: for r_LGE_unique in c_unique_LGE('LGE') loop
20307:
20308: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20309: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20310: r_LGE_unique.information3 >=
20311: ben_pd_copy_to_ben_one.g_copy_effective_date)
20312: ) then
20305: -- End Prefix Sufix derivation
20306: for r_LGE_unique in c_unique_LGE('LGE') loop
20307:
20308: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20309: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20310: r_LGE_unique.information3 >=
20311: ben_pd_copy_to_ben_one.g_copy_effective_date)
20312: ) then
20313: --
20307:
20308: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20309: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20310: r_LGE_unique.information3 >=
20311: ben_pd_copy_to_ben_one.g_copy_effective_date)
20312: ) then
20313: --
20314: hr_utility.set_location(' r_LGE_unique.table_route_id '||r_LGE_unique.table_route_id,10);
20315: hr_utility.set_location(' r_LGE_unique.information1 '||r_LGE_unique.information1,10);
20345: l_object_found_in_target := TRUE;
20346: --
20347: if l_process_date between r_LGE_unique.information2 and r_LGE_unique.information3 then
20348: l_update := true;
20349: 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)
20350: 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'
20351: then
20352: 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' ;
20353: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20346: --
20347: if l_process_date between r_LGE_unique.information2 and r_LGE_unique.information3 then
20348: l_update := true;
20349: 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)
20350: 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'
20351: then
20352: 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' ;
20353: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20354: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20348: l_update := true;
20349: 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)
20350: 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'
20351: then
20352: 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' ;
20353: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20354: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20355: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20356: 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;
20349: 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)
20350: 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'
20351: then
20352: 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' ;
20353: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20354: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20355: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20356: 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;
20357: --
20350: 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'
20351: then
20352: 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' ;
20353: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20354: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20355: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20356: 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;
20357: --
20358: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20351: then
20352: 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' ;
20353: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20354: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20355: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20356: 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;
20357: --
20358: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20359: --
20352: 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' ;
20353: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20354: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20355: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20356: 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;
20357: --
20358: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20359: --
20360: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20356: 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;
20357: --
20358: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20359: --
20360: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20361: --
20362: --DOUBT log_data('LGE',l_new_value,l_prefix || r_LGE_unique.name|| l_suffix,'REUSED');
20363: --
20364: end if ;
20377: open c_LGE_min_max_dates(r_LGE_unique.table_route_id, r_LGE_unique.information1 ) ;
20378: fetch c_LGE_min_max_dates into l_min_esd,l_max_eed ;
20379: --
20380:
20381: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20382: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20383: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20384: end if;
20385: l_min_esd := greatest(l_min_esd,r_LGE_unique.information2);
20378: fetch c_LGE_min_max_dates into l_min_esd,l_max_eed ;
20379: --
20380:
20381: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20382: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20383: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20384: end if;
20385: l_min_esd := greatest(l_min_esd,r_LGE_unique.information2);
20386: /* open c_LGE(r_LGE_unique.table_route_id,
20379: --
20380:
20381: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20382: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20383: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20384: end if;
20385: l_min_esd := greatest(l_min_esd,r_LGE_unique.information2);
20386: /* open c_LGE(r_LGE_unique.table_route_id,
20387: r_LGE_unique.information1,
20408: p_to_date => l_max_eed );
20409: if l_dt_rec_found THEN
20410: --END TEMPIK
20411: --
20412: 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
20413: 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
20414: 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' ;
20415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20409: if l_dt_rec_found THEN
20410: --END TEMPIK
20411: --
20412: 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
20413: 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
20414: 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' ;
20415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20410: --END TEMPIK
20411: --
20412: 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
20413: 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
20414: 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' ;
20415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20418: 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;
20411: --
20412: 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
20413: 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
20414: 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' ;
20415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20418: 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;
20419: --
20412: 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
20413: 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
20414: 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' ;
20415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20418: 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;
20419: --
20420: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20413: 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
20414: 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' ;
20415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20418: 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;
20419: --
20420: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20421: --
20414: 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' ;
20415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20418: 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;
20419: --
20420: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20421: --
20422: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20418: 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;
20419: --
20420: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20421: --
20422: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20423: end if ;
20424: --
20418: 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;
20419: --
20420: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20421: --
20422: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20423: end if ;
20424: --
20425: l_object_found_in_target := true ;
20426: --TEMPIK
20453: end if ;
20454: --
20455:
20456: l_effective_date := r_LGE.information2;
20457: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20458: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20459: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20460: end if;
20461:
20454: --
20455:
20456: l_effective_date := r_LGE.information2;
20457: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20458: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20459: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20460: end if;
20461:
20462: if l_first_rec and not l_update then
20455:
20456: l_effective_date := r_LGE.information2;
20457: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20458: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20459: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20460: end if;
20461:
20462: if l_first_rec and not l_update then
20463: -- Call Create routine.
20518: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
20519: -- Update all relevent cer records with new pk_id
20520: hr_utility.set_location('Before plsql table ',222);
20521: hr_utility.set_location('new_value id '||l_ler_chg_pgm_enrt_id,222);
20522: 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' ;
20523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20524: 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 ;
20525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20526: 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;
20519: -- Update all relevent cer records with new pk_id
20520: hr_utility.set_location('Before plsql table ',222);
20521: hr_utility.set_location('new_value id '||l_ler_chg_pgm_enrt_id,222);
20522: 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' ;
20523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20524: 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 ;
20525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20526: 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;
20527: hr_utility.set_location('After plsql table ',222);
20520: hr_utility.set_location('Before plsql table ',222);
20521: hr_utility.set_location('new_value id '||l_ler_chg_pgm_enrt_id,222);
20522: 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' ;
20523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20524: 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 ;
20525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20526: 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;
20527: hr_utility.set_location('After plsql table ',222);
20528: --
20521: hr_utility.set_location('new_value id '||l_ler_chg_pgm_enrt_id,222);
20522: 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' ;
20523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20524: 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 ;
20525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20526: 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;
20527: hr_utility.set_location('After plsql table ',222);
20528: --
20529: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20522: 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' ;
20523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20524: 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 ;
20525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20526: 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;
20527: hr_utility.set_location('After plsql table ',222);
20528: --
20529: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20530: --
20525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20526: 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;
20527: hr_utility.set_location('After plsql table ',222);
20528: --
20529: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20530: --
20531: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20532: --
20533: else
20527: hr_utility.set_location('After plsql table ',222);
20528: --
20529: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20530: --
20531: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20532: --
20533: else
20534: --
20535: -- Call Update routine for the pk_id created in prev run .
20647: end loop;
20648: --
20649: exception when others then
20650: --
20651: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LGE',r_lge.information5 );
20652: --
20653: end create_LGE_rows;
20654:
20655: --
20799: end if ;
20800: -- End Prefix Sufix derivation
20801: for r_LDC_unique in c_unique_LDC('LDC') loop
20802:
20803: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20804: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20805: r_LDC_unique.information3 >=
20806: ben_pd_copy_to_ben_one.g_copy_effective_date)
20807: ) then
20800: -- End Prefix Sufix derivation
20801: for r_LDC_unique in c_unique_LDC('LDC') loop
20802:
20803: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20804: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20805: r_LDC_unique.information3 >=
20806: ben_pd_copy_to_ben_one.g_copy_effective_date)
20807: ) then
20808: --
20802:
20803: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20804: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20805: r_LDC_unique.information3 >=
20806: ben_pd_copy_to_ben_one.g_copy_effective_date)
20807: ) then
20808: --
20809: hr_utility.set_location(' r_LDC_unique.table_route_id '||r_LDC_unique.table_route_id,10);
20810: hr_utility.set_location(' r_LDC_unique.information1 '||r_LDC_unique.information1,10);
20842: l_object_found_in_target := TRUE;
20843: --
20844: if l_process_date between r_LDC_unique.information2 and r_LDC_unique.information3 then
20845: l_update := true;
20846: 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)
20847: 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'
20848: then
20849: 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' ;
20850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20843: --
20844: if l_process_date between r_LDC_unique.information2 and r_LDC_unique.information3 then
20845: l_update := true;
20846: 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)
20847: 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'
20848: then
20849: 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' ;
20850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20845: l_update := true;
20846: 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)
20847: 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'
20848: then
20849: 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' ;
20850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20853: 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;
20846: 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)
20847: 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'
20848: then
20849: 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' ;
20850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20853: 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;
20854: --
20847: 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'
20848: then
20849: 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' ;
20850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20853: 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;
20854: --
20855: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20848: then
20849: 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' ;
20850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20853: 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;
20854: --
20855: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20856: --
20849: 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' ;
20850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20853: 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;
20854: --
20855: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20856: --
20857: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20853: 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;
20854: --
20855: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20856: --
20857: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20858: --
20859: --DOUBT log_data('LDC',l_new_value,l_prefix || r_LDC_unique.name|| l_suffix,'REUSED');
20860: --
20861: end if ;
20874: open c_LDC_min_max_dates(r_LDC_unique.table_route_id, r_LDC_unique.information1 ) ;
20875: fetch c_LDC_min_max_dates into l_min_esd,l_max_eed ;
20876: --
20877:
20878: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20879: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20880: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20881: end if;
20882: l_min_esd := greatest(l_min_esd,r_LDC_unique.information2);
20875: fetch c_LDC_min_max_dates into l_min_esd,l_max_eed ;
20876: --
20877:
20878: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20879: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20880: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20881: end if;
20882: l_min_esd := greatest(l_min_esd,r_LDC_unique.information2);
20883: /* open c_LDC(r_LDC_unique.table_route_id,
20876: --
20877:
20878: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20879: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20880: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20881: end if;
20882: l_min_esd := greatest(l_min_esd,r_LDC_unique.information2);
20883: /* open c_LDC(r_LDC_unique.table_route_id,
20884: r_LDC_unique.information1,
20905: p_from_date => l_min_esd,
20906: p_to_date => l_max_eed );
20907: if l_dt_rec_found THEN
20908: --END TEMPIK
20909: 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
20910: 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
20911: 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' ;
20912: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20906: p_to_date => l_max_eed );
20907: if l_dt_rec_found THEN
20908: --END TEMPIK
20909: 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
20910: 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
20911: 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' ;
20912: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20907: if l_dt_rec_found THEN
20908: --END TEMPIK
20909: 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
20910: 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
20911: 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' ;
20912: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20915: 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;
20908: --END TEMPIK
20909: 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
20910: 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
20911: 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' ;
20912: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20915: 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;
20916: --
20909: 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
20910: 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
20911: 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' ;
20912: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20915: 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;
20916: --
20917: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20910: 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
20911: 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' ;
20912: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20915: 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;
20916: --
20917: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20918: --
20911: 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' ;
20912: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20915: 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;
20916: --
20917: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20918: --
20919: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20915: 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;
20916: --
20917: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20918: --
20919: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20920: end if ;
20921: --
20915: 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;
20916: --
20917: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20918: --
20919: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20920: end if ;
20921: --
20922: l_object_found_in_target := true ;
20923: --TEMPIK
20950: end if ;
20951: --
20952:
20953: l_effective_date := r_LDC.information2;
20954: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20955: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20956: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20957: end if;
20958:
20951: --
20952:
20953: l_effective_date := r_LDC.information2;
20954: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20955: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20956: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20957: end if;
20958:
20959: if l_first_rec and not l_update then
20952:
20953: l_effective_date := r_LDC.information2;
20954: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20955: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20956: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20957: end if;
20958:
20959: if l_first_rec and not l_update then
20960: -- Call Create routine.
21018: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
21019: -- Update all relevent cer records with new pk_id
21020: hr_utility.set_location('Before plsql table ',222);
21021: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_id,222);
21022: 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' ;
21023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21024: 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 ;
21025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21026: 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;
21019: -- Update all relevent cer records with new pk_id
21020: hr_utility.set_location('Before plsql table ',222);
21021: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_id,222);
21022: 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' ;
21023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21024: 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 ;
21025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21026: 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;
21027: hr_utility.set_location('After plsql table ',222);
21020: hr_utility.set_location('Before plsql table ',222);
21021: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_id,222);
21022: 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' ;
21023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21024: 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 ;
21025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21026: 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;
21027: hr_utility.set_location('After plsql table ',222);
21028: --
21021: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_id,222);
21022: 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' ;
21023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21024: 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 ;
21025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21026: 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;
21027: hr_utility.set_location('After plsql table ',222);
21028: --
21029: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21022: 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' ;
21023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21024: 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 ;
21025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21026: 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;
21027: hr_utility.set_location('After plsql table ',222);
21028: --
21029: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21030: --
21025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21026: 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;
21027: hr_utility.set_location('After plsql table ',222);
21028: --
21029: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21030: --
21031: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21032: --
21033: else
21027: hr_utility.set_location('After plsql table ',222);
21028: --
21029: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21030: --
21031: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21032: --
21033: else
21034: --
21035: -- Call Update routine for the pk_id created in prev run .
21150: end loop;
21151: --
21152: exception when others then
21153: --
21154: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LDC',r_ldc.information5 );
21155: --
21156: end create_LDC_rows;
21157:
21158: ---------------------------------------------------------------
21290: end if ;
21291: -- End Prefix Sufix derivation
21292: for r_PAT_unique in c_unique_PAT('PAT') loop
21293:
21294: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21295: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21296: r_PAT_unique.information3 >=
21297: ben_pd_copy_to_ben_one.g_copy_effective_date)
21298: ) then
21291: -- End Prefix Sufix derivation
21292: for r_PAT_unique in c_unique_PAT('PAT') loop
21293:
21294: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21295: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21296: r_PAT_unique.information3 >=
21297: ben_pd_copy_to_ben_one.g_copy_effective_date)
21298: ) then
21299:
21293:
21294: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21295: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21296: r_PAT_unique.information3 >=
21297: ben_pd_copy_to_ben_one.g_copy_effective_date)
21298: ) then
21299:
21300: --
21301: hr_utility.set_location(' r_PAT_unique.table_route_id '||r_PAT_unique.table_route_id,10);
21332: l_object_found_in_target := TRUE;
21333: --
21334: if l_process_date between r_PAT_unique.information2 and r_PAT_unique.information3 then
21335: l_update := true;
21336: 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)
21337: 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'
21338: then
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21333: --
21334: if l_process_date between r_PAT_unique.information2 and r_PAT_unique.information3 then
21335: l_update := true;
21336: 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)
21337: 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'
21338: then
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21341: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21335: l_update := true;
21336: 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)
21337: 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'
21338: then
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21341: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21343: 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;
21336: 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)
21337: 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'
21338: then
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21341: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21343: 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;
21344: --
21337: 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'
21338: then
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21341: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21343: 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;
21344: --
21345: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21338: then
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21341: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21343: 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;
21344: --
21345: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21346: --
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21341: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21343: 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;
21344: --
21345: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21346: --
21347: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21343: 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;
21344: --
21345: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21346: --
21347: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21348: --
21349: --DOUBT log_data('PAT',l_new_value,l_prefix || r_PAT_unique.name|| l_suffix,'REUSED');
21350: --
21351: end if ;
21364: open c_PAT_min_max_dates(r_PAT_unique.table_route_id, r_PAT_unique.information1 ) ;
21365: fetch c_PAT_min_max_dates into l_min_esd,l_max_eed ;
21366: --
21367:
21368: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21369: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21370: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21371: end if;
21372: l_min_esd := greatest(l_min_esd,r_PAT_unique.information2);
21365: fetch c_PAT_min_max_dates into l_min_esd,l_max_eed ;
21366: --
21367:
21368: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21369: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21370: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21371: end if;
21372: l_min_esd := greatest(l_min_esd,r_PAT_unique.information2);
21373: /* open c_PAT(r_PAT_unique.table_route_id,
21366: --
21367:
21368: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21369: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21370: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21371: end if;
21372: l_min_esd := greatest(l_min_esd,r_PAT_unique.information2);
21373: /* open c_PAT(r_PAT_unique.table_route_id,
21374: r_PAT_unique.information1,
21400: p_from_date => l_min_esd,
21401: p_to_date => l_max_eed );
21402: if l_dt_rec_found THEN
21403: --END TEMPIK
21404: 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
21405: 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
21406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21401: p_to_date => l_max_eed );
21402: if l_dt_rec_found THEN
21403: --END TEMPIK
21404: 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
21405: 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
21406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21402: if l_dt_rec_found THEN
21403: --END TEMPIK
21404: 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
21405: 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
21406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21410: 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;
21403: --END TEMPIK
21404: 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
21405: 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
21406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21410: 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;
21411: --
21404: 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
21405: 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
21406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21410: 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;
21411: --
21412: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21405: 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
21406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21410: 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;
21411: --
21412: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21413: --
21406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21410: 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;
21411: --
21412: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21413: --
21414: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21410: 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;
21411: --
21412: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21413: --
21414: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21415: end if ;
21416: --
21410: 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;
21411: --
21412: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21413: --
21414: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21415: end if ;
21416: --
21417: l_object_found_in_target := true ;
21418: --TEMPIK
21445: end if ;
21446: --
21447:
21448: l_effective_date := r_PAT.information2;
21449: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21450: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21451: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21452: end if;
21453:
21446: --
21447:
21448: l_effective_date := r_PAT.information2;
21449: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21450: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21451: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21452: end if;
21453:
21454: if l_first_rec and not l_update then
21447:
21448: l_effective_date := r_PAT.information2;
21449: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21450: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21451: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21452: end if;
21453:
21454: if l_first_rec and not l_update then
21455: -- Call Create routine.
21505: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
21506: -- Update all relevent cer records with new pk_id
21507: hr_utility.set_location('Before plsql table ',222);
21508: hr_utility.set_location('new_value id '||l_popl_actn_typ_id,222);
21509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21513: 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;
21506: -- Update all relevent cer records with new pk_id
21507: hr_utility.set_location('Before plsql table ',222);
21508: hr_utility.set_location('new_value id '||l_popl_actn_typ_id,222);
21509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21513: 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;
21514: hr_utility.set_location('After plsql table ',222);
21507: hr_utility.set_location('Before plsql table ',222);
21508: hr_utility.set_location('new_value id '||l_popl_actn_typ_id,222);
21509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21513: 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;
21514: hr_utility.set_location('After plsql table ',222);
21515: --
21508: hr_utility.set_location('new_value id '||l_popl_actn_typ_id,222);
21509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21513: 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;
21514: hr_utility.set_location('After plsql table ',222);
21515: --
21516: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21513: 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;
21514: hr_utility.set_location('After plsql table ',222);
21515: --
21516: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21517: --
21512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21513: 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;
21514: hr_utility.set_location('After plsql table ',222);
21515: --
21516: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21517: --
21518: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21519: --
21520: else
21514: hr_utility.set_location('After plsql table ',222);
21515: --
21516: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21517: --
21518: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21519: --
21520: else
21521: --
21522: -- Call Update routine for the pk_id created in prev run .
21631: end loop;
21632: --
21633: exception when others then
21634: --
21635: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PAT',r_pat.information5 );
21636: --
21637: end create_PAT_rows;
21638: --
21639: ---------------------------------------------------------------
21793: end if ;
21794: -- End Prefix Sufix derivation
21795: for r_PEO_unique in c_unique_PEO('PEO') loop
21796:
21797: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21798: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21799: r_PEO_unique.information3 >=
21800: ben_pd_copy_to_ben_one.g_copy_effective_date)
21801: ) then
21794: -- End Prefix Sufix derivation
21795: for r_PEO_unique in c_unique_PEO('PEO') loop
21796:
21797: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21798: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21799: r_PEO_unique.information3 >=
21800: ben_pd_copy_to_ben_one.g_copy_effective_date)
21801: ) then
21802:
21796:
21797: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21798: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21799: r_PEO_unique.information3 >=
21800: ben_pd_copy_to_ben_one.g_copy_effective_date)
21801: ) then
21802:
21803: --
21804: hr_utility.set_location(' r_PEO_unique.table_route_id '||r_PEO_unique.table_route_id,10);
21844: l_object_found_in_target := TRUE;
21845: --
21846: if l_process_date between r_PEO_unique.information2 and r_PEO_unique.information3 then
21847: l_update := true;
21848: 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)
21849: 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'
21850: then
21851: 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' ;
21852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21845: --
21846: if l_process_date between r_PEO_unique.information2 and r_PEO_unique.information3 then
21847: l_update := true;
21848: 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)
21849: 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'
21850: then
21851: 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' ;
21852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21847: l_update := true;
21848: 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)
21849: 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'
21850: then
21851: 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' ;
21852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21855: 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;
21848: 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)
21849: 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'
21850: then
21851: 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' ;
21852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21855: 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;
21856: --
21849: 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'
21850: then
21851: 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' ;
21852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21855: 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;
21856: --
21857: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21850: then
21851: 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' ;
21852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21855: 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;
21856: --
21857: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21858: --
21851: 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' ;
21852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21855: 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;
21856: --
21857: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21858: --
21859: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21855: 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;
21856: --
21857: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21858: --
21859: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21860: --
21861: --DOUBT log_data('PEO',l_new_value,l_prefix || r_PEO_unique.name|| l_suffix,'REUSED');
21862: --
21863: end if ;
21876: open c_PEO_min_max_dates(r_PEO_unique.table_route_id, r_PEO_unique.information1 ) ;
21877: fetch c_PEO_min_max_dates into l_min_esd,l_max_eed ;
21878: --
21879:
21880: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21881: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21882: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21883: end if;
21884: l_min_esd := greatest(l_min_esd,r_PEO_unique.information2);
21877: fetch c_PEO_min_max_dates into l_min_esd,l_max_eed ;
21878: --
21879:
21880: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21881: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21882: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21883: end if;
21884: l_min_esd := greatest(l_min_esd,r_PEO_unique.information2);
21885: /* open c_PEO(r_PEO_unique.table_route_id,
21878: --
21879:
21880: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21881: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21882: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21883: end if;
21884: l_min_esd := greatest(l_min_esd,r_PEO_unique.information2);
21885: /* open c_PEO(r_PEO_unique.table_route_id,
21886: r_PEO_unique.information1,
21890: fetch c_PEO into r_PEO ;
21891: --
21892: close c_PEO ; */
21893: --
21894: hr_utility.set_location('g_count '||BEN_PD_COPY_TO_BEN_ONE.g_count,123);
21895: hr_utility.set_location('r_PEO.information14 '||r_PEO.information14 ,123);
21896: --
21897:
21898: if p_reuse_object_flag = 'Y' then
21911: p_from_date => l_min_esd,
21912: p_to_date => l_max_eed );
21913: if l_dt_rec_found THEN
21914: --END TEMPIK
21915: 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
21916: 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
21917: 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' ;
21918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21912: p_to_date => l_max_eed );
21913: if l_dt_rec_found THEN
21914: --END TEMPIK
21915: 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
21916: 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
21917: 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' ;
21918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21913: if l_dt_rec_found THEN
21914: --END TEMPIK
21915: 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
21916: 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
21917: 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' ;
21918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21921: 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;
21914: --END TEMPIK
21915: 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
21916: 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
21917: 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' ;
21918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21921: 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;
21922: --
21915: 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
21916: 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
21917: 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' ;
21918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21921: 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;
21922: --
21923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21916: 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
21917: 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' ;
21918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21921: 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;
21922: --
21923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21924: --
21917: 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' ;
21918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21921: 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;
21922: --
21923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21924: --
21925: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21921: 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;
21922: --
21923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21924: --
21925: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21926: end if ;
21927: --
21921: 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;
21922: --
21923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21924: --
21925: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21926: end if ;
21927: --
21928: l_object_found_in_target := true ;
21929: --TEMPIK
21956: end if ;
21957: --
21958:
21959: l_effective_date := r_PEO.information2;
21960: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21961: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21962: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21963: end if;
21964:
21957: --
21958:
21959: l_effective_date := r_PEO.information2;
21960: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21961: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21962: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21963: end if;
21964:
21965: if l_first_rec and not l_update then
21958:
21959: l_effective_date := r_PEO.information2;
21960: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21961: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21962: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21963: end if;
21964:
21965: if l_first_rec and not l_update then
21966: -- Call Create routine.
22037: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
22038: -- Update all relevent cer records with new pk_id
22039: hr_utility.set_location('Before plsql table ',222);
22040: hr_utility.set_location('new_value id '||l_elig_to_prte_rsn_id,222);
22041: 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' ;
22042: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22043: 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 ;
22044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22045: 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;
22038: -- Update all relevent cer records with new pk_id
22039: hr_utility.set_location('Before plsql table ',222);
22040: hr_utility.set_location('new_value id '||l_elig_to_prte_rsn_id,222);
22041: 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' ;
22042: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22043: 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 ;
22044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22045: 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;
22046: hr_utility.set_location('After plsql table ',222);
22039: hr_utility.set_location('Before plsql table ',222);
22040: hr_utility.set_location('new_value id '||l_elig_to_prte_rsn_id,222);
22041: 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' ;
22042: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22043: 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 ;
22044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22045: 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;
22046: hr_utility.set_location('After plsql table ',222);
22047: --
22040: hr_utility.set_location('new_value id '||l_elig_to_prte_rsn_id,222);
22041: 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' ;
22042: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22043: 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 ;
22044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22045: 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;
22046: hr_utility.set_location('After plsql table ',222);
22047: --
22048: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22041: 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' ;
22042: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22043: 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 ;
22044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22045: 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;
22046: hr_utility.set_location('After plsql table ',222);
22047: --
22048: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22049: --
22044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22045: 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;
22046: hr_utility.set_location('After plsql table ',222);
22047: --
22048: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22049: --
22050: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22051: --
22052: else
22046: hr_utility.set_location('After plsql table ',222);
22047: --
22048: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22049: --
22050: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22051: --
22052: else
22053: --
22054: -- Call Update routine for the pk_id created in prev run .
22182: end loop;
22183: --
22184: exception when others then
22185: --
22186: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PEO',r_peo.information5 );
22187: --
22188: end create_PEO_rows;
22189:
22190: --
22331: --
22332: if l_dml_operation = 'UPDATE' then
22333: --
22334: l_update := true;
22335: 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
22336: 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
22337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22332: if l_dml_operation = 'UPDATE' then
22333: --
22334: l_update := true;
22335: 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
22336: 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
22337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22333: --
22334: l_update := true;
22335: 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
22336: 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
22337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22341: 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;
22334: l_update := true;
22335: 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
22336: 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
22337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22341: 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;
22342: --
22335: 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
22336: 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
22337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22341: 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;
22342: --
22343: -- update_cer_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
22336: 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
22337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22341: 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;
22342: --
22343: -- update_cer_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
22344: --
22337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22341: 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;
22342: --
22343: -- update_cer_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
22344: --
22345: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22340: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22341: 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;
22342: --
22343: -- update_cer_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
22344: --
22345: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22346: --
22347: --DOUBT log_data('CWG',l_new_value,l_prefix || r_CWG_unique.name|| l_suffix,'REUSED');
22341: 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;
22342: --
22343: -- update_cer_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
22344: --
22345: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22346: --
22347: --DOUBT log_data('CWG',l_new_value,l_prefix || r_CWG_unique.name|| l_suffix,'REUSED');
22348: --
22349: end if ;
22360: p_target_business_group_id, nvl(l_cwb_wksht_grp_id, -999) ) ;
22361: fetch c_find_CWG_in_target into l_new_value ;
22362: if c_find_CWG_in_target%found then
22363: --
22364: 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
22365: 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
22366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22361: fetch c_find_CWG_in_target into l_new_value ;
22362: if c_find_CWG_in_target%found then
22363: --
22364: 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
22365: 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
22366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22362: if c_find_CWG_in_target%found then
22363: --
22364: 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
22365: 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
22366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22370: 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;
22363: --
22364: 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
22365: 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
22366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22370: 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;
22371: --
22364: 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
22365: 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
22366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22370: 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;
22371: --
22372: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22365: 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
22366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22370: 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;
22371: --
22372: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22373: --
22366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22370: 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;
22371: --
22372: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22373: --
22374: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22370: 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;
22371: --
22372: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22373: --
22374: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22375: --
22376:
22370: 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;
22371: --
22372: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22373: --
22374: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22375: --
22376:
22377: end if ;
22378: --
22413: hr_utility.set_location(' BEN_CWB_WKSHT_GRP CREATE_CWB_WKSHT_GRP ',20);
22414: BEN_CWB_WKSHT_GRP_API.CREATE_CWB_WKSHT_GRP(
22415: --
22416: P_VALIDATE => false
22417: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
22418: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
22419: ,P_CWB_WKSHT_GRP_ID => l_cwb_wksht_grp_id
22420: ,P_CWG_ATTRIBUTE1 => r_CWG.INFORMATION111
22421: ,P_CWG_ATTRIBUTE10 => r_CWG.INFORMATION120
22461: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
22462: -- Update all relevent cer records with new pk_id
22463: hr_utility.set_location('Before plsql table ',222);
22464: hr_utility.set_location('new_value id '||l_cwb_wksht_grp_id,222);
22465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22468: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22469: 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;
22462: -- Update all relevent cer records with new pk_id
22463: hr_utility.set_location('Before plsql table ',222);
22464: hr_utility.set_location('new_value id '||l_cwb_wksht_grp_id,222);
22465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22468: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22469: 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;
22470: hr_utility.set_location('After plsql table ',222);
22463: hr_utility.set_location('Before plsql table ',222);
22464: hr_utility.set_location('new_value id '||l_cwb_wksht_grp_id,222);
22465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22468: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22469: 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;
22470: hr_utility.set_location('After plsql table ',222);
22471: --
22464: hr_utility.set_location('new_value id '||l_cwb_wksht_grp_id,222);
22465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22468: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22469: 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;
22470: hr_utility.set_location('After plsql table ',222);
22471: --
22472: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22465: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22466: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22467: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22468: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22469: 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;
22470: hr_utility.set_location('After plsql table ',222);
22471: --
22472: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22473: --
22468: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22469: 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;
22470: hr_utility.set_location('After plsql table ',222);
22471: --
22472: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22473: --
22474: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22475: --
22476: elsif l_update then
22470: hr_utility.set_location('After plsql table ',222);
22471: --
22472: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22473: --
22474: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22475: --
22476: elsif l_update then
22477: BEN_CWB_WKSHT_GRP_API.UPDATE_CWB_WKSHT_GRP(
22478: --
22476: elsif l_update then
22477: BEN_CWB_WKSHT_GRP_API.UPDATE_CWB_WKSHT_GRP(
22478: --
22479: P_VALIDATE => false
22480: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
22481: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
22482: ,P_CWB_WKSHT_GRP_ID => l_cwb_wksht_grp_id
22483: ,P_CWG_ATTRIBUTE1 => r_CWG.INFORMATION111
22484: ,P_CWG_ATTRIBUTE10 => r_CWG.INFORMATION120
22530: end loop;
22531: --
22532: exception when others then
22533: --
22534: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CWG',r_cwg.information5 );
22535: --
22536: end create_CWG_rows;
22537:
22538: ---------------------------------------------------------------
22713:
22714: --
22715: exception when others then
22716: --
22717: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CRI' , l_debug_item_name) ;
22718: --
22719:
22720: end create_CRI_rows;
22721:
22890: --
22891: if l_dml_operation = 'UPDATE' then
22892: --
22893: l_update := true;
22894: 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
22895: 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
22896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
22891: if l_dml_operation = 'UPDATE' then
22892: --
22893: l_update := true;
22894: 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
22895: 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
22896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
22899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22892: --
22893: l_update := true;
22894: 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
22895: 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
22896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
22899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22900: 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;
22893: l_update := true;
22894: 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
22895: 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
22896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
22899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22900: 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;
22901: --
22894: 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
22895: 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
22896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
22899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22900: 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;
22901: --
22902: -- update_cer_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
22895: 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
22896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
22899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22900: 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;
22901: --
22902: -- update_cer_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
22903: --
22896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
22899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22900: 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;
22901: --
22902: -- update_cer_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
22903: --
22904: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
22899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22900: 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;
22901: --
22902: -- update_cer_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
22903: --
22904: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22905: --
22906: --DOUBT log_data('PCP',l_new_value,l_prefix || r_PCP_unique.name|| l_suffix,'REUSED');
22900: 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;
22901: --
22902: -- update_cer_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
22903: --
22904: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22905: --
22906: --DOUBT log_data('PCP',l_new_value,l_prefix || r_PCP_unique.name|| l_suffix,'REUSED');
22907: --
22908: end if ;
22919: p_target_business_group_id, nvl(l_pl_pcp_id, -999) ) ;
22920: fetch c_find_PCP_in_target into l_new_value ;
22921: if c_find_PCP_in_target%found then
22922: --
22923: 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
22924: 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
22925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22920: fetch c_find_PCP_in_target into l_new_value ;
22921: if c_find_PCP_in_target%found then
22922: --
22923: 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
22924: 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
22925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22921: if c_find_PCP_in_target%found then
22922: --
22923: 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
22924: 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
22925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22929: 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;
22922: --
22923: 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
22924: 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
22925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22929: 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;
22930: --
22923: 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
22924: 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
22925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22929: 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;
22930: --
22931: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22924: 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
22925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22929: 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;
22930: --
22931: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22932: --
22925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
22927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22929: 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;
22930: --
22931: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22932: --
22933: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22927: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22928: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22929: 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;
22930: --
22931: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22932: --
22933: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22934: end if ;
22935: --
22929: 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;
22930: --
22931: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22932: --
22933: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22934: end if ;
22935: --
22936: l_object_found_in_target := true ;
22937: end if;
22959: end if ;
22960: --
22961:
22962: l_parent_effective_start_date := r_PCP.information10;
22963: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
22964: if l_parent_effective_start_date is null then
22965: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22966: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
22967: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22961:
22962: l_parent_effective_start_date := r_PCP.information10;
22963: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
22964: if l_parent_effective_start_date is null then
22965: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22966: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
22967: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22968: end if;
22969: end if;
22962: l_parent_effective_start_date := r_PCP.information10;
22963: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
22964: if l_parent_effective_start_date is null then
22965: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22966: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
22967: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22968: end if;
22969: end if;
22970: --
22963: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
22964: if l_parent_effective_start_date is null then
22965: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22966: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
22967: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22968: end if;
22969: end if;
22970: --
22971: -- To avoid creating a child with out parent
23032: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
23033: -- Update all relevent cer records with new pk_id
23034: hr_utility.set_location('Before plsql table ',222);
23035: hr_utility.set_location('new_value id '||l_pl_pcp_id,222);
23036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23040: 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;
23033: -- Update all relevent cer records with new pk_id
23034: hr_utility.set_location('Before plsql table ',222);
23035: hr_utility.set_location('new_value id '||l_pl_pcp_id,222);
23036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23040: 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;
23041: hr_utility.set_location('After plsql table ',222);
23034: hr_utility.set_location('Before plsql table ',222);
23035: hr_utility.set_location('new_value id '||l_pl_pcp_id,222);
23036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23040: 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;
23041: hr_utility.set_location('After plsql table ',222);
23042: --
23035: hr_utility.set_location('new_value id '||l_pl_pcp_id,222);
23036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23040: 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;
23041: hr_utility.set_location('After plsql table ',222);
23042: --
23043: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23040: 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;
23041: hr_utility.set_location('After plsql table ',222);
23042: --
23043: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23044: --
23039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23040: 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;
23041: hr_utility.set_location('After plsql table ',222);
23042: --
23043: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23044: --
23045: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23046: --
23047: elsif l_update then
23041: hr_utility.set_location('After plsql table ',222);
23042: --
23043: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23044: --
23045: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23046: --
23047: elsif l_update then
23048: BEN_PL_PRMRY_CARE_PRVDR_API.UPDATE_PL_PRMRY_CARE_PRVDR(
23049: --
23108: end loop;
23109: --
23110: exception when others then
23111: --
23112: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PCP',r_pcp.information5 );
23113: --
23114: end create_PCP_rows;
23115:
23116: --
23259: end if ;
23260: -- End Prefix Sufix derivation
23261: for r_COP_unique in c_unique_COP('COP') loop
23262:
23263: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23264: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23265: r_COP_unique.information3 >=
23266: ben_pd_copy_to_ben_one.g_copy_effective_date)
23267: ) then
23260: -- End Prefix Sufix derivation
23261: for r_COP_unique in c_unique_COP('COP') loop
23262:
23263: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23264: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23265: r_COP_unique.information3 >=
23266: ben_pd_copy_to_ben_one.g_copy_effective_date)
23267: ) then
23268: --
23262:
23263: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23264: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23265: r_COP_unique.information3 >=
23266: ben_pd_copy_to_ben_one.g_copy_effective_date)
23267: ) then
23268: --
23269: hr_utility.set_location(' r_COP_unique.table_route_id '||r_COP_unique.table_route_id,10);
23270: hr_utility.set_location(' r_COP_unique.information1 '||r_COP_unique.information1,10);
23305: l_object_found_in_target := TRUE;
23306: --
23307: if l_process_date between r_COP_unique.information2 and r_COP_unique.information3 then
23308: l_update := true;
23309: 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)
23310: 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'
23311: then
23312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23306: --
23307: if l_process_date between r_COP_unique.information2 and r_COP_unique.information3 then
23308: l_update := true;
23309: 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)
23310: 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'
23311: then
23312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23308: l_update := true;
23309: 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)
23310: 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'
23311: then
23312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23316: 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;
23309: 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)
23310: 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'
23311: then
23312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23316: 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;
23317: --
23310: 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'
23311: then
23312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23316: 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;
23317: --
23318: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23311: then
23312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23316: 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;
23317: --
23318: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23319: --
23312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23316: 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;
23317: --
23318: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23319: --
23320: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23316: 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;
23317: --
23318: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23319: --
23320: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23321: --
23322: --DOUBT log_data('COP',l_new_value,l_prefix || r_COP_unique.name|| l_suffix,'REUSED');
23323: --
23324: end if ;
23337: open c_COP_min_max_dates(r_COP_unique.table_route_id, r_COP_unique.information1 ) ;
23338: fetch c_COP_min_max_dates into l_min_esd,l_max_eed ;
23339: --
23340:
23341: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23342: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23343: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23344: end if;
23345: l_min_esd := greatest(l_min_esd,r_COP_unique.information2);
23338: fetch c_COP_min_max_dates into l_min_esd,l_max_eed ;
23339: --
23340:
23341: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23342: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23343: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23344: end if;
23345: l_min_esd := greatest(l_min_esd,r_COP_unique.information2);
23346: /* open c_COP(r_COP_unique.table_route_id,
23339: --
23340:
23341: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23342: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23343: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23344: end if;
23345: l_min_esd := greatest(l_min_esd,r_COP_unique.information2);
23346: /* open c_COP(r_COP_unique.table_route_id,
23347: r_COP_unique.information1,
23370: p_from_date => l_min_esd,
23371: p_to_date => l_max_eed );
23372: if l_dt_rec_found THEN
23373: --END TEMPIK
23374: 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
23375: 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
23376: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23377: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23371: p_to_date => l_max_eed );
23372: if l_dt_rec_found THEN
23373: --END TEMPIK
23374: 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
23375: 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
23376: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23377: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23372: if l_dt_rec_found THEN
23373: --END TEMPIK
23374: 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
23375: 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
23376: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23377: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23380: 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;
23373: --END TEMPIK
23374: 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
23375: 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
23376: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23377: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23380: 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;
23381: --
23374: 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
23375: 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
23376: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23377: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23380: 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;
23381: --
23382: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23375: 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
23376: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23377: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23380: 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;
23381: --
23382: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23383: --
23376: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23377: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23380: 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;
23381: --
23382: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23383: --
23384: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23380: 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;
23381: --
23382: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23383: --
23384: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23385: end if ;
23386: --
23380: 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;
23381: --
23382: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23383: --
23384: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23385: end if ;
23386: --
23387: l_object_found_in_target := true ;
23388: --TEMPIK
23415: end if ;
23416: --
23417:
23418: l_effective_date := r_COP.information2;
23419: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23420: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23421: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23422: end if;
23423:
23416: --
23417:
23418: l_effective_date := r_COP.information2;
23419: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23420: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23421: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23422: end if;
23423:
23424: if l_first_rec and not l_update then
23417:
23418: l_effective_date := r_COP.information2;
23419: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23420: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23421: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23422: end if;
23423:
23424: if l_first_rec and not l_update then
23425: -- Call Create routine.
23506: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
23507: -- Update all relevent cer records with new pk_id
23508: hr_utility.set_location('Before plsql table ',222);
23509: hr_utility.set_location('new_value id '||l_oipl_id,222);
23510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23514: 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;
23507: -- Update all relevent cer records with new pk_id
23508: hr_utility.set_location('Before plsql table ',222);
23509: hr_utility.set_location('new_value id '||l_oipl_id,222);
23510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23514: 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;
23515: hr_utility.set_location('After plsql table ',222);
23508: hr_utility.set_location('Before plsql table ',222);
23509: hr_utility.set_location('new_value id '||l_oipl_id,222);
23510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23514: 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;
23515: hr_utility.set_location('After plsql table ',222);
23516: --
23509: hr_utility.set_location('new_value id '||l_oipl_id,222);
23510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23514: 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;
23515: hr_utility.set_location('After plsql table ',222);
23516: --
23517: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23510: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23511: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23512: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23514: 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;
23515: hr_utility.set_location('After plsql table ',222);
23516: --
23517: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23518: --
23513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23514: 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;
23515: hr_utility.set_location('After plsql table ',222);
23516: --
23517: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23518: --
23519: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23520: --
23521: else
23515: hr_utility.set_location('After plsql table ',222);
23516: --
23517: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23518: --
23519: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23520: --
23521: else
23522: --
23523: -- Call Update routine for the pk_id created in prev run .
23661: end loop;
23662: --
23663: exception when others then
23664: --
23665: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'COP',r_cop.information5 );
23666: --
23667: end create_COP_rows;
23668:
23669: --
23813: end if ;
23814: -- End Prefix Sufix derivation
23815: for r_DDR_unique in c_unique_DDR('DDR') loop
23816:
23817: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23818: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23819: r_DDR_unique.information3 >=
23820: ben_pd_copy_to_ben_one.g_copy_effective_date)
23821: ) then
23814: -- End Prefix Sufix derivation
23815: for r_DDR_unique in c_unique_DDR('DDR') loop
23816:
23817: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23818: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23819: r_DDR_unique.information3 >=
23820: ben_pd_copy_to_ben_one.g_copy_effective_date)
23821: ) then
23822: --
23816:
23817: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23818: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23819: r_DDR_unique.information3 >=
23820: ben_pd_copy_to_ben_one.g_copy_effective_date)
23821: ) then
23822: --
23823: hr_utility.set_location(' r_DDR_unique.table_route_id '||r_DDR_unique.table_route_id,10);
23824: hr_utility.set_location(' r_DDR_unique.information1 '||r_DDR_unique.information1,10);
23854: l_object_found_in_target := TRUE;
23855: --
23856: if l_process_date between r_DDR_unique.information2 and r_DDR_unique.information3 then
23857: l_update := true;
23858: 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)
23859: 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'
23860: then
23861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23855: --
23856: if l_process_date between r_DDR_unique.information2 and r_DDR_unique.information3 then
23857: l_update := true;
23858: 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)
23859: 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'
23860: then
23861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23857: l_update := true;
23858: 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)
23859: 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'
23860: then
23861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23865: 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;
23858: 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)
23859: 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'
23860: then
23861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23865: 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;
23866: --
23859: 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'
23860: then
23861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23865: 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;
23866: --
23867: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23860: then
23861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23865: 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;
23866: --
23867: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23868: --
23861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23865: 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;
23866: --
23867: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23868: --
23869: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23865: 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;
23866: --
23867: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23868: --
23869: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23870: --
23871: --DOUBT log_data('DDR',l_new_value,l_prefix || r_DDR_unique.name|| l_suffix,'REUSED');
23872: --
23873: end if ;
23886: open c_DDR_min_max_dates(r_DDR_unique.table_route_id, r_DDR_unique.information1 ) ;
23887: fetch c_DDR_min_max_dates into l_min_esd,l_max_eed ;
23888: --
23889:
23890: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23891: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23892: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23893: end if;
23894: l_min_esd := greatest(l_min_esd,r_DDR_unique.information2);
23887: fetch c_DDR_min_max_dates into l_min_esd,l_max_eed ;
23888: --
23889:
23890: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23891: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23892: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23893: end if;
23894: l_min_esd := greatest(l_min_esd,r_DDR_unique.information2);
23895: /* open c_DDR(r_DDR_unique.table_route_id,
23888: --
23889:
23890: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23891: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23892: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23893: end if;
23894: l_min_esd := greatest(l_min_esd,r_DDR_unique.information2);
23895: /* open c_DDR(r_DDR_unique.table_route_id,
23896: r_DDR_unique.information1,
23917: p_from_date => l_min_esd,
23918: p_to_date => l_max_eed );
23919: if l_dt_rec_found THEN
23920: --END TEMPIK
23921: 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
23922: 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
23923: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23924: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23918: p_to_date => l_max_eed );
23919: if l_dt_rec_found THEN
23920: --END TEMPIK
23921: 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
23922: 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
23923: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23924: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23919: if l_dt_rec_found THEN
23920: --END TEMPIK
23921: 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
23922: 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
23923: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23924: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23927: 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;
23920: --END TEMPIK
23921: 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
23922: 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
23923: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23924: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23927: 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;
23928: --
23921: 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
23922: 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
23923: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23924: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23927: 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;
23928: --
23929: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23922: 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
23923: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23924: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23927: 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;
23928: --
23929: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23930: --
23923: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23924: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23927: 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;
23928: --
23929: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23930: --
23931: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23925: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23926: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23927: 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;
23928: --
23929: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23930: --
23931: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23932: end if ;
23933: --
23927: 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;
23928: --
23929: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23930: --
23931: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23932: end if ;
23933: --
23934: l_object_found_in_target := true ;
23935: --TEMPIK
23962: end if ;
23963: --
23964:
23965: l_effective_date := r_DDR.information2;
23966: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23967: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23968: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23969: end if;
23970:
23963: --
23964:
23965: l_effective_date := r_DDR.information2;
23966: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23967: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23968: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23969: end if;
23970:
23971: if l_first_rec and not l_update then
23964:
23965: l_effective_date := r_DDR.information2;
23966: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23967: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23968: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23969: end if;
23970:
23971: if l_first_rec and not l_update then
23972: -- Call Create routine.
24027: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
24028: -- Update all relevent cer records with new pk_id
24029: hr_utility.set_location('Before plsql table ',222);
24030: hr_utility.set_location('new_value id '||l_dsgn_rqmt_id,222);
24031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24032: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24033: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24034: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24035: 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;
24028: -- Update all relevent cer records with new pk_id
24029: hr_utility.set_location('Before plsql table ',222);
24030: hr_utility.set_location('new_value id '||l_dsgn_rqmt_id,222);
24031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24032: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24033: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24034: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24035: 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;
24036: hr_utility.set_location('After plsql table ',222);
24029: hr_utility.set_location('Before plsql table ',222);
24030: hr_utility.set_location('new_value id '||l_dsgn_rqmt_id,222);
24031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24032: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24033: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24034: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24035: 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;
24036: hr_utility.set_location('After plsql table ',222);
24037: --
24030: hr_utility.set_location('new_value id '||l_dsgn_rqmt_id,222);
24031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24032: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24033: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24034: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24035: 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;
24036: hr_utility.set_location('After plsql table ',222);
24037: --
24038: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24032: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24033: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24034: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24035: 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;
24036: hr_utility.set_location('After plsql table ',222);
24037: --
24038: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24039: --
24034: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24035: 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;
24036: hr_utility.set_location('After plsql table ',222);
24037: --
24038: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24039: --
24040: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24041: --
24042: else
24036: hr_utility.set_location('After plsql table ',222);
24037: --
24038: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24039: --
24040: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24041: --
24042: else
24043: --
24044: -- Call Update routine for the pk_id created in prev run .
24156: end loop;
24157: --
24158: exception when others then
24159: --
24160: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'DDR',r_ddr.information5 );
24161: --
24162: end create_DDR_rows;
24163:
24164: --
24306: --
24307: if l_dml_operation = 'UPDATE' then
24308: --
24309: l_update := true;
24310: 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
24311: 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
24312: 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' ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24307: if l_dml_operation = 'UPDATE' then
24308: --
24309: l_update := true;
24310: 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
24311: 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
24312: 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' ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24308: --
24309: l_update := true;
24310: 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
24311: 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
24312: 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' ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24316: 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;
24309: l_update := true;
24310: 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
24311: 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
24312: 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' ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24316: 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;
24317: --
24310: 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
24311: 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
24312: 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' ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24316: 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;
24317: --
24318: -- update_cer_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
24311: 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
24312: 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' ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24316: 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;
24317: --
24318: -- update_cer_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
24319: --
24312: 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' ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24316: 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;
24317: --
24318: -- update_cer_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
24319: --
24320: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24316: 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;
24317: --
24318: -- update_cer_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
24319: --
24320: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24321: --
24322: --DOUBT log_data('DRR',l_new_value,l_prefix || r_DRR_unique.name|| l_suffix,'REUSED');
24316: 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;
24317: --
24318: -- update_cer_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
24319: --
24320: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24321: --
24322: --DOUBT log_data('DRR',l_new_value,l_prefix || r_DRR_unique.name|| l_suffix,'REUSED');
24323: --
24324: end if ;
24335: p_target_business_group_id, nvl(l_dsgn_rqmt_rlshp_typ_id, -999) ) ;
24336: fetch c_find_DRR_in_target into l_new_value ;
24337: if c_find_DRR_in_target%found then
24338: --
24339: 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
24340: 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
24341: 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' ;
24342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24343: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24336: fetch c_find_DRR_in_target into l_new_value ;
24337: if c_find_DRR_in_target%found then
24338: --
24339: 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
24340: 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
24341: 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' ;
24342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24343: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24344: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24337: if c_find_DRR_in_target%found then
24338: --
24339: 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
24340: 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
24341: 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' ;
24342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24343: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24344: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24345: 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;
24338: --
24339: 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
24340: 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
24341: 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' ;
24342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24343: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24344: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24345: 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;
24346: --
24339: 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
24340: 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
24341: 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' ;
24342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24343: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24344: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24345: 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;
24346: --
24347: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24340: 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
24341: 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' ;
24342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24343: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24344: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24345: 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;
24346: --
24347: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24348: --
24341: 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' ;
24342: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24343: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24344: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24345: 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;
24346: --
24347: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24348: --
24349: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24343: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24344: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24345: 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;
24346: --
24347: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24348: --
24349: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24350: end if ;
24351: --
24345: 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;
24346: --
24347: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24348: --
24349: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24350: end if ;
24351: --
24352: l_object_found_in_target := true ;
24353: end if;
24375: end if ;
24376: --
24377:
24378: l_parent_effective_start_date := r_DRR.information10;
24379: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
24380: if l_parent_effective_start_date is null then
24381: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24382: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
24383: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24377:
24378: l_parent_effective_start_date := r_DRR.information10;
24379: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
24380: if l_parent_effective_start_date is null then
24381: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24382: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
24383: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24384: end if;
24385: end if;
24378: l_parent_effective_start_date := r_DRR.information10;
24379: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
24380: if l_parent_effective_start_date is null then
24381: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24382: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
24383: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24384: end if;
24385: end if;
24386: --
24379: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
24380: if l_parent_effective_start_date is null then
24381: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24382: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
24383: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24384: end if;
24385: end if;
24386: --
24387: -- To avoid creating a child with out a parent
24440: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
24441: -- Update all relevent cer records with new pk_id
24442: hr_utility.set_location('Before plsql table ',222);
24443: hr_utility.set_location('new_value id '||l_dsgn_rqmt_rlshp_typ_id,222);
24444: 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' ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24446: 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 ;
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24448: 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;
24441: -- Update all relevent cer records with new pk_id
24442: hr_utility.set_location('Before plsql table ',222);
24443: hr_utility.set_location('new_value id '||l_dsgn_rqmt_rlshp_typ_id,222);
24444: 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' ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24446: 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 ;
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24448: 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;
24449: hr_utility.set_location('After plsql table ',222);
24442: hr_utility.set_location('Before plsql table ',222);
24443: hr_utility.set_location('new_value id '||l_dsgn_rqmt_rlshp_typ_id,222);
24444: 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' ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24446: 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 ;
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24448: 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;
24449: hr_utility.set_location('After plsql table ',222);
24450: --
24443: hr_utility.set_location('new_value id '||l_dsgn_rqmt_rlshp_typ_id,222);
24444: 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' ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24446: 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 ;
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24448: 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;
24449: hr_utility.set_location('After plsql table ',222);
24450: --
24451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24444: 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' ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24446: 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 ;
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24448: 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;
24449: hr_utility.set_location('After plsql table ',222);
24450: --
24451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24452: --
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24448: 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;
24449: hr_utility.set_location('After plsql table ',222);
24450: --
24451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24452: --
24453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24454: --
24455: elsif l_update then
24449: hr_utility.set_location('After plsql table ',222);
24450: --
24451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24452: --
24453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24454: --
24455: elsif l_update then
24456: BEN_DSGN_RQMT_RLSHP_TYP_API.UPDATE_DSGN_RQMT_RLSHP_TYP(
24457: --
24505: end loop;
24506: --
24507: exception when others then
24508: --
24509: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'DRR',r_drr.information5 );
24510: --
24511: end create_DRR_rows;
24512:
24513: --
24637: end if ;
24638: -- End Prefix Sufix derivation
24639: for r_OPP_unique in c_unique_OPP('OPP') loop
24640:
24641: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24642: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24643: r_OPP_unique.information3 >=
24644: ben_pd_copy_to_ben_one.g_copy_effective_date)
24645: ) then
24638: -- End Prefix Sufix derivation
24639: for r_OPP_unique in c_unique_OPP('OPP') loop
24640:
24641: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24642: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24643: r_OPP_unique.information3 >=
24644: ben_pd_copy_to_ben_one.g_copy_effective_date)
24645: ) then
24646: --
24640:
24641: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24642: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24643: r_OPP_unique.information3 >=
24644: ben_pd_copy_to_ben_one.g_copy_effective_date)
24645: ) then
24646: --
24647: hr_utility.set_location(' r_OPP_unique.table_route_id '||r_OPP_unique.table_route_id,10);
24648: hr_utility.set_location(' r_OPP_unique.information1 '||r_OPP_unique.information1,10);
24658: open c_OPP_min_max_dates(r_OPP_unique.table_route_id, r_OPP_unique.information1 ) ;
24659: fetch c_OPP_min_max_dates into l_min_esd,l_max_eed ;
24660: --
24661:
24662: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24663: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24664: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24665: end if;
24666: l_min_esd := greatest(l_min_esd,r_OPP_unique.information2);
24659: fetch c_OPP_min_max_dates into l_min_esd,l_max_eed ;
24660: --
24661:
24662: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24663: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24664: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24665: end if;
24666: l_min_esd := greatest(l_min_esd,r_OPP_unique.information2);
24667: open c_OPP(r_OPP_unique.table_route_id,
24660: --
24661:
24662: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24663: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24664: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24665: end if;
24666: l_min_esd := greatest(l_min_esd,r_OPP_unique.information2);
24667: open c_OPP(r_OPP_unique.table_route_id,
24668: r_OPP_unique.information1,
24696: p_from_date => l_min_esd,
24697: p_to_date => l_max_eed );
24698: if l_dt_rec_found THEN
24699: --END TEMPIK
24700: 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
24701: 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
24702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24697: p_to_date => l_max_eed );
24698: if l_dt_rec_found THEN
24699: --END TEMPIK
24700: 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
24701: 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
24702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24705: 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
24698: if l_dt_rec_found THEN
24699: --END TEMPIK
24700: 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
24701: 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
24702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24705: 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
24706: 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;
24699: --END TEMPIK
24700: 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
24701: 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
24702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24705: 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
24706: 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;
24707: --
24700: 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
24701: 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
24702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24705: 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
24706: 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;
24707: --
24708: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24701: 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
24702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24705: 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
24706: 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;
24707: --
24708: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24709: --
24702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24705: 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
24706: 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;
24707: --
24708: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24709: --
24710: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24705: 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
24706: 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;
24707: --
24708: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24709: --
24710: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24711: end if ;
24712: --
24706: 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;
24707: --
24708: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24709: --
24710: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24711: end if ;
24712: --
24713: l_object_found_in_target := true ;
24714: --TEMPIK
24742: end if ;
24743: --
24744:
24745: l_effective_date := r_OPP.information2;
24746: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24747: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24748: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24749: end if;
24750:
24743: --
24744:
24745: l_effective_date := r_OPP.information2;
24746: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24747: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24748: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24749: end if;
24750:
24751: if l_first_rec then
24744:
24745: l_effective_date := r_OPP.information2;
24746: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24747: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24748: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24749: end if;
24750:
24751: if l_first_rec then
24752: -- Call Create routine.
24799: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
24800: -- Update all relevent cer records with new pk_id
24801: hr_utility.set_location('Before plsql table ',222);
24802: hr_utility.set_location('new_value id '||l_oiplip_id,222);
24803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24807: 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;
24800: -- Update all relevent cer records with new pk_id
24801: hr_utility.set_location('Before plsql table ',222);
24802: hr_utility.set_location('new_value id '||l_oiplip_id,222);
24803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24807: 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;
24808: hr_utility.set_location('After plsql table ',222);
24801: hr_utility.set_location('Before plsql table ',222);
24802: hr_utility.set_location('new_value id '||l_oiplip_id,222);
24803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24807: 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;
24808: hr_utility.set_location('After plsql table ',222);
24809: --
24802: hr_utility.set_location('new_value id '||l_oiplip_id,222);
24803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24807: 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;
24808: hr_utility.set_location('After plsql table ',222);
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: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24807: 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;
24808: hr_utility.set_location('After plsql table ',222);
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: --
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24807: 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;
24808: hr_utility.set_location('After plsql table ',222);
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: --
24814: else
24808: hr_utility.set_location('After plsql table ',222);
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: --
24814: else
24815: --
24816: -- Call Update routine for the pk_id created in prev run .
24894: end loop;
24895: --
24896: exception when others then
24897: --
24898: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'OPP',r_opp.information5 );
24899: --
24900: end create_OPP_rows;
24901:
24902: --
25036: end if ;
25037: -- End Prefix Sufix derivation
25038: for r_OTP_unique in c_unique_OTP('OTP') loop
25039:
25040: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25041: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25042: r_OTP_unique.information3 >=
25043: ben_pd_copy_to_ben_one.g_copy_effective_date)
25044: ) then
25037: -- End Prefix Sufix derivation
25038: for r_OTP_unique in c_unique_OTP('OTP') loop
25039:
25040: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25041: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25042: r_OTP_unique.information3 >=
25043: ben_pd_copy_to_ben_one.g_copy_effective_date)
25044: ) then
25045: --
25039:
25040: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25041: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25042: r_OTP_unique.information3 >=
25043: ben_pd_copy_to_ben_one.g_copy_effective_date)
25044: ) then
25045: --
25046: hr_utility.set_location(' r_OTP_unique.table_route_id '||r_OTP_unique.table_route_id,10);
25047: hr_utility.set_location(' r_OTP_unique.information1 '||r_OTP_unique.information1,10);
25057: open c_OTP_min_max_dates(r_OTP_unique.table_route_id, r_OTP_unique.information1 ) ;
25058: fetch c_OTP_min_max_dates into l_min_esd,l_max_eed ;
25059: --
25060:
25061: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25062: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25063: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25064: end if;
25065: l_min_esd := greatest(l_min_esd,r_OTP_unique.information2);
25058: fetch c_OTP_min_max_dates into l_min_esd,l_max_eed ;
25059: --
25060:
25061: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25062: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25063: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25064: end if;
25065: l_min_esd := greatest(l_min_esd,r_OTP_unique.information2);
25066: open c_OTP(r_OTP_unique.table_route_id,
25059: --
25060:
25061: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25062: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25063: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25064: end if;
25065: l_min_esd := greatest(l_min_esd,r_OTP_unique.information2);
25066: open c_OTP(r_OTP_unique.table_route_id,
25067: r_OTP_unique.information1,
25093: p_from_date => l_min_esd,
25094: p_to_date => l_max_eed );
25095: if l_dt_rec_found THEN
25096: --END TEMPIK
25097: 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
25098: 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
25099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25094: p_to_date => l_max_eed );
25095: if l_dt_rec_found THEN
25096: --END TEMPIK
25097: 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
25098: 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
25099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25102: 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
25095: if l_dt_rec_found THEN
25096: --END TEMPIK
25097: 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
25098: 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
25099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25102: 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
25103: 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;
25096: --END TEMPIK
25097: 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
25098: 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
25099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25102: 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
25103: 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;
25104: --
25097: 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
25098: 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
25099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25102: 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
25103: 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;
25104: --
25105: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25098: 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
25099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25102: 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
25103: 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;
25104: --
25105: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25106: --
25099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25102: 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
25103: 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;
25104: --
25105: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25106: --
25107: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25102: 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
25103: 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;
25104: --
25105: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25106: --
25107: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25108: end if ;
25109: --
25103: 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;
25104: --
25105: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25106: --
25107: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25108: end if ;
25109: --
25110: l_object_found_in_target := true ;
25111: --TEMPIK
25138: end if ;
25139: --
25140:
25141: l_effective_date := r_OTP.information2;
25142: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25143: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25144: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25145: end if;
25146:
25139: --
25140:
25141: l_effective_date := r_OTP.information2;
25142: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25143: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25144: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25145: end if;
25146:
25147: if l_first_rec then
25140:
25141: l_effective_date := r_OTP.information2;
25142: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25143: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25144: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25145: end if;
25146:
25147: if l_first_rec then
25148: -- Call Create routine.
25198: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
25199: -- Update all relevent cer records with new pk_id
25200: hr_utility.set_location('Before plsql table ',222);
25201: hr_utility.set_location('new_value id '||l_optip_id,222);
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25206: 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;
25199: -- Update all relevent cer records with new pk_id
25200: hr_utility.set_location('Before plsql table ',222);
25201: hr_utility.set_location('new_value id '||l_optip_id,222);
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25206: 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;
25207: hr_utility.set_location('After plsql table ',222);
25200: hr_utility.set_location('Before plsql table ',222);
25201: hr_utility.set_location('new_value id '||l_optip_id,222);
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25206: 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;
25207: hr_utility.set_location('After plsql table ',222);
25208: --
25201: hr_utility.set_location('new_value id '||l_optip_id,222);
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25206: 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;
25207: hr_utility.set_location('After plsql table ',222);
25208: --
25209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25206: 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;
25207: hr_utility.set_location('After plsql table ',222);
25208: --
25209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25210: --
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25206: 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;
25207: hr_utility.set_location('After plsql table ',222);
25208: --
25209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25210: --
25211: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25212: --
25213: else
25207: hr_utility.set_location('After plsql table ',222);
25208: --
25209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25210: --
25211: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25212: --
25213: else
25214: --
25215: -- Call Update routine for the pk_id created in prev run .
25296: end loop;
25297: --
25298: exception when others then
25299: --
25300: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'OTP',r_otp.information5 );
25301: --
25302: end create_OTP_rows;
25303: --
25304: ---------------------------------------------------------------
25469: --
25470: if l_dml_operation = 'UPDATE' then
25471: --
25472: l_update := true;
25473: 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
25474: 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
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25470: if l_dml_operation = 'UPDATE' then
25471: --
25472: l_update := true;
25473: 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
25474: 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
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25471: --
25472: l_update := true;
25473: 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
25474: 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
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25479: 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;
25472: l_update := true;
25473: 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
25474: 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
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25479: 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;
25480: --
25473: 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
25474: 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
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25479: 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;
25480: --
25481: -- update_cer_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
25474: 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
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25479: 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;
25480: --
25481: -- update_cer_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
25482: --
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25479: 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;
25480: --
25481: -- update_cer_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
25482: --
25483: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25479: 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;
25480: --
25481: -- update_cer_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
25482: --
25483: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25484: --
25485: --DOUBT log_data('PTY',l_new_value,l_prefix || r_PTY_unique.name|| l_suffix,'REUSED');
25479: 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;
25480: --
25481: -- update_cer_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
25482: --
25483: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25484: --
25485: --DOUBT log_data('PTY',l_new_value,l_prefix || r_PTY_unique.name|| l_suffix,'REUSED');
25486: --
25487: end if ;
25499: p_target_business_group_id, nvl(l_pl_pcp_typ_id, -999) ) ;
25500: fetch c_find_PTY_in_target into l_new_value ;
25501: if c_find_PTY_in_target%found then
25502: --
25503: 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
25504: 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
25505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25500: fetch c_find_PTY_in_target into l_new_value ;
25501: if c_find_PTY_in_target%found then
25502: --
25503: 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
25504: 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
25505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25501: if c_find_PTY_in_target%found then
25502: --
25503: 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
25504: 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
25505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25509: 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;
25502: --
25503: 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
25504: 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
25505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25509: 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;
25510: --
25503: 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
25504: 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
25505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25509: 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;
25510: --
25511: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25504: 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
25505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25509: 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;
25510: --
25511: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25512: --
25505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25509: 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;
25510: --
25511: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25512: --
25513: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25509: 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;
25510: --
25511: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25512: --
25513: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25514: end if ;
25515: --
25509: 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;
25510: --
25511: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25512: --
25513: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25514: end if ;
25515: --
25516: l_object_found_in_target := true ;
25517: end if;
25544: hr_utility.set_location(' BEN_PL_PCP_TYP CREATE_PL_CARE_PRVDR_TYP ',20);
25545: BEN_PL_CARE_PRVDR_TYP_API.CREATE_PL_CARE_PRVDR_TYP(
25546: --
25547: P_VALIDATE => false
25548: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
25549: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
25550: --
25551: ,P_GNDR_ALWD_CD => r_PTY.INFORMATION12
25552: ,P_MAX_AGE => r_PTY.INFORMATION294
25591: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
25592: -- Update all relevent cer records with new pk_id
25593: hr_utility.set_location('Before plsql table ',222);
25594: hr_utility.set_location('new_value id '||l_pl_pcp_typ_id,222);
25595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25599: 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;
25592: -- Update all relevent cer records with new pk_id
25593: hr_utility.set_location('Before plsql table ',222);
25594: hr_utility.set_location('new_value id '||l_pl_pcp_typ_id,222);
25595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25599: 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;
25600: hr_utility.set_location('After plsql table ',222);
25593: hr_utility.set_location('Before plsql table ',222);
25594: hr_utility.set_location('new_value id '||l_pl_pcp_typ_id,222);
25595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25599: 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;
25600: hr_utility.set_location('After plsql table ',222);
25601: --
25594: hr_utility.set_location('new_value id '||l_pl_pcp_typ_id,222);
25595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25599: 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;
25600: hr_utility.set_location('After plsql table ',222);
25601: --
25602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25599: 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;
25600: hr_utility.set_location('After plsql table ',222);
25601: --
25602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25603: --
25598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25599: 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;
25600: hr_utility.set_location('After plsql table ',222);
25601: --
25602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25603: --
25604: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25605: --
25606: elsif l_update then
25600: hr_utility.set_location('After plsql table ',222);
25601: --
25602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25603: --
25604: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25605: --
25606: elsif l_update then
25607: BEN_PL_CARE_PRVDR_TYP_API.UPDATE_PL_CARE_PRVDR_TYP(
25608: --
25606: elsif l_update then
25607: BEN_PL_CARE_PRVDR_TYP_API.UPDATE_PL_CARE_PRVDR_TYP(
25608: --
25609: P_VALIDATE => false
25610: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
25611: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
25612: --
25613: ,P_GNDR_ALWD_CD => r_PTY.INFORMATION12
25614: ,P_MAX_AGE => r_PTY.INFORMATION294
25661: end loop;
25662: --
25663: exception when others then
25664: --
25665: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PTY',r_pty.information5 );
25666: --
25667: end create_PTY_rows;
25668:
25669: --
25802: end if ;
25803: -- End Prefix Sufix derivation
25804: for r_PRP_unique in c_unique_PRP('PRP') loop
25805:
25806: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25807: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25808: r_PRP_unique.information3 >=
25809: ben_pd_copy_to_ben_one.g_copy_effective_date)
25810: ) then
25803: -- End Prefix Sufix derivation
25804: for r_PRP_unique in c_unique_PRP('PRP') loop
25805:
25806: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25807: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25808: r_PRP_unique.information3 >=
25809: ben_pd_copy_to_ben_one.g_copy_effective_date)
25810: ) then
25811: --
25805:
25806: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25807: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25808: r_PRP_unique.information3 >=
25809: ben_pd_copy_to_ben_one.g_copy_effective_date)
25810: ) then
25811: --
25812: hr_utility.set_location(' r_PRP_unique.table_route_id '||r_PRP_unique.table_route_id,10);
25813: hr_utility.set_location(' r_PRP_unique.information1 '||r_PRP_unique.information1,10);
25840: l_object_found_in_target := TRUE;
25841: --
25842: if l_process_date between r_PRP_unique.information2 and r_PRP_unique.information3 then
25843: l_update := true;
25844: 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)
25845: 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'
25846: then
25847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25841: --
25842: if l_process_date between r_PRP_unique.information2 and r_PRP_unique.information3 then
25843: l_update := true;
25844: 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)
25845: 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'
25846: then
25847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25843: l_update := true;
25844: 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)
25845: 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'
25846: then
25847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25851: 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;
25844: 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)
25845: 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'
25846: then
25847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25851: 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;
25852: --
25845: 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'
25846: then
25847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25851: 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;
25852: --
25853: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
25846: then
25847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25851: 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;
25852: --
25853: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
25854: --
25847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25851: 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;
25852: --
25853: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
25854: --
25855: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25851: 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;
25852: --
25853: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
25854: --
25855: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25856: --
25857: --DOUBT log_data('PRP',l_new_value,l_prefix || r_PRP_unique.name|| l_suffix,'REUSED');
25858: --
25859: end if ;
25872: open c_PRP_min_max_dates(r_PRP_unique.table_route_id, r_PRP_unique.information1 ) ;
25873: fetch c_PRP_min_max_dates into l_min_esd,l_max_eed ;
25874: --
25875:
25876: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25877: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25878: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25879: end if;
25880: l_min_esd := greatest(l_min_esd,r_PRP_unique.information2);
25873: fetch c_PRP_min_max_dates into l_min_esd,l_max_eed ;
25874: --
25875:
25876: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25877: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25878: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25879: end if;
25880: l_min_esd := greatest(l_min_esd,r_PRP_unique.information2);
25881: /* open c_PRP(r_PRP_unique.table_route_id,
25874: --
25875:
25876: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25877: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25878: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25879: end if;
25880: l_min_esd := greatest(l_min_esd,r_PRP_unique.information2);
25881: /* open c_PRP(r_PRP_unique.table_route_id,
25882: r_PRP_unique.information1,
25907: p_from_date => l_min_esd,
25908: p_to_date => l_max_eed );
25909: if l_dt_rec_found THEN
25910: --END TEMPIK
25911: 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
25912: 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
25913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25908: p_to_date => l_max_eed );
25909: if l_dt_rec_found THEN
25910: --END TEMPIK
25911: 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
25912: 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
25913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25909: if l_dt_rec_found THEN
25910: --END TEMPIK
25911: 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
25912: 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
25913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25917: 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;
25910: --END TEMPIK
25911: 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
25912: 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
25913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25917: 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;
25918: --
25911: 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
25912: 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
25913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25917: 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;
25918: --
25919: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25912: 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
25913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25917: 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;
25918: --
25919: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25920: --
25913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25917: 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;
25918: --
25919: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25920: --
25921: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25917: 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;
25918: --
25919: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25920: --
25921: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25922: end if ;
25923: --
25917: 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;
25918: --
25919: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25920: --
25921: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25922: end if ;
25923: --
25924: l_object_found_in_target := true ;
25925: --TEMPIK
25952: end if ;
25953: --
25954:
25955: l_effective_date := r_PRP.information2;
25956: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25957: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25958: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25959: end if;
25960:
25953: --
25954:
25955: l_effective_date := r_PRP.information2;
25956: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25957: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25958: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25959: end if;
25960:
25961: if l_first_rec and not l_update then
25954:
25955: l_effective_date := r_PRP.information2;
25956: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25957: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25958: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25959: end if;
25960:
25961: if l_first_rec and not l_update then
25962: -- Call Create routine.
26009: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
26010: -- Update all relevent cer records with new pk_id
26011: hr_utility.set_location('Before plsql table ',222);
26012: hr_utility.set_location('new_value id '||l_pl_regy_prps_id,222);
26013: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26017: 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;
26010: -- Update all relevent cer records with new pk_id
26011: hr_utility.set_location('Before plsql table ',222);
26012: hr_utility.set_location('new_value id '||l_pl_regy_prps_id,222);
26013: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26017: 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;
26018: hr_utility.set_location('After plsql table ',222);
26011: hr_utility.set_location('Before plsql table ',222);
26012: hr_utility.set_location('new_value id '||l_pl_regy_prps_id,222);
26013: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26017: 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;
26018: hr_utility.set_location('After plsql table ',222);
26019: --
26012: hr_utility.set_location('new_value id '||l_pl_regy_prps_id,222);
26013: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26017: 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;
26018: hr_utility.set_location('After plsql table ',222);
26019: --
26020: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26013: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26017: 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;
26018: hr_utility.set_location('After plsql table ',222);
26019: --
26020: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26021: --
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26017: 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;
26018: hr_utility.set_location('After plsql table ',222);
26019: --
26020: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26021: --
26022: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26023: --
26024: else
26018: hr_utility.set_location('After plsql table ',222);
26019: --
26020: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26021: --
26022: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26023: --
26024: else
26025: --
26026: -- Call Update routine for the pk_id created in prev run .
26132: end loop;
26133: --
26134: exception when others then
26135: --
26136: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PRP',r_prp.information5 );
26137: --
26138: end create_PRP_rows;
26139:
26140: --
26320: -- Derive the prefix - sufix
26321: -- End Prefix Sufix derivation
26322: for r_BPP_unique in c_unique_BPP('BPP') loop
26323:
26324: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26325: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26326: r_BPP_unique.information3 >=
26327: ben_pd_copy_to_ben_one.g_copy_effective_date)
26328: ) then
26321: -- End Prefix Sufix derivation
26322: for r_BPP_unique in c_unique_BPP('BPP') loop
26323:
26324: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26325: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26326: r_BPP_unique.information3 >=
26327: ben_pd_copy_to_ben_one.g_copy_effective_date)
26328: ) then
26329: --
26323:
26324: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26325: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26326: r_BPP_unique.information3 >=
26327: ben_pd_copy_to_ben_one.g_copy_effective_date)
26328: ) then
26329: --
26330: if p_prefix_suffix_cd = 'PREFIX' then
26331: l_prefix := p_prefix_suffix_text ;
26375: l_object_found_in_target := TRUE;
26376: --
26377: if l_process_date between r_BPP_unique.information2 and r_BPP_unique.information3 then
26378: l_update := true;
26379: 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)
26380: 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'
26381: then
26382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26376: --
26377: if l_process_date between r_BPP_unique.information2 and r_BPP_unique.information3 then
26378: l_update := true;
26379: 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)
26380: 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'
26381: then
26382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26378: l_update := true;
26379: 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)
26380: 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'
26381: then
26382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26386: 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;
26379: 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)
26380: 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'
26381: then
26382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26386: 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;
26387: --
26380: 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'
26381: then
26382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26386: 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;
26387: --
26388: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26381: then
26382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26386: 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;
26387: --
26388: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26389: --
26382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26386: 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;
26387: --
26388: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26389: --
26390: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26386: 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;
26387: --
26388: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26389: --
26390: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26391: --
26392: --DOUBT log_data('BPP',l_new_value,l_prefix || r_BPP_unique.name|| l_suffix,'REUSED');
26393: --
26394: end if ;
26407: open c_BPP_min_max_dates(r_BPP_unique.table_route_id, r_BPP_unique.information1 ) ;
26408: fetch c_BPP_min_max_dates into l_min_esd,l_max_eed ;
26409: --
26410:
26411: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26412: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26413: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26414: end if;
26415: l_min_esd := greatest(l_min_esd,r_BPP_unique.information2);
26408: fetch c_BPP_min_max_dates into l_min_esd,l_max_eed ;
26409: --
26410:
26411: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26412: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26413: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26414: end if;
26415: l_min_esd := greatest(l_min_esd,r_BPP_unique.information2);
26416: /* open c_BPP(r_BPP_unique.table_route_id,
26409: --
26410:
26411: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26412: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26413: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26414: end if;
26415: l_min_esd := greatest(l_min_esd,r_BPP_unique.information2);
26416: /* open c_BPP(r_BPP_unique.table_route_id,
26417: r_BPP_unique.information1,
26439: p_to_date => l_max_eed );
26440: if l_dt_rec_found THEN
26441: --END TEMPIK
26442: --
26443: 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
26444: 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
26445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26440: if l_dt_rec_found THEN
26441: --END TEMPIK
26442: --
26443: 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
26444: 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
26445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26441: --END TEMPIK
26442: --
26443: 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
26444: 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
26445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26449: 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;
26442: --
26443: 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
26444: 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
26445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26449: 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;
26450: --
26443: 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
26444: 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
26445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26449: 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;
26450: --
26451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26444: 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
26445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26449: 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;
26450: --
26451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26452: --
26445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26449: 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;
26450: --
26451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26452: --
26453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26449: 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;
26450: --
26451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26452: --
26453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26454: --
26455: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP_unique.name || l_suffix ,'REUSED');
26449: 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;
26450: --
26451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26452: --
26453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26454: --
26455: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP_unique.name || l_suffix ,'REUSED');
26456: --
26457: end if ;
26451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26452: --
26453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26454: --
26455: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP_unique.name || l_suffix ,'REUSED');
26456: --
26457: end if ;
26458: --
26459: l_object_found_in_target := true ;
26521: --
26522: end if ;
26523: --
26524: --
26525: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_BNFT_PRVDR_POOL_F',l_prefix || r_BPP.information170 || l_suffix);
26526: --
26527:
26528: l_effective_date := r_BPP.information2;
26529: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26525: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_BNFT_PRVDR_POOL_F',l_prefix || r_BPP.information170 || l_suffix);
26526: --
26527:
26528: l_effective_date := r_BPP.information2;
26529: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26530: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26531: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26532: end if;
26533:
26526: --
26527:
26528: l_effective_date := r_BPP.information2;
26529: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26530: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26531: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26532: end if;
26533:
26534: if l_first_rec and not l_update then
26527:
26528: l_effective_date := r_BPP.information2;
26529: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26530: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26531: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26532: end if;
26533:
26534: if l_first_rec and not l_update then
26535: -- Call Create routine.
26613: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
26614: -- Update all relevent cer records with new pk_id
26615: hr_utility.set_location('Before plsql table ',222);
26616: hr_utility.set_location('new_value id '||l_bnft_prvdr_pool_id,222);
26617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26621: 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;
26614: -- Update all relevent cer records with new pk_id
26615: hr_utility.set_location('Before plsql table ',222);
26616: hr_utility.set_location('new_value id '||l_bnft_prvdr_pool_id,222);
26617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26621: 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;
26622: hr_utility.set_location('After plsql table ',222);
26615: hr_utility.set_location('Before plsql table ',222);
26616: hr_utility.set_location('new_value id '||l_bnft_prvdr_pool_id,222);
26617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26621: 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;
26622: hr_utility.set_location('After plsql table ',222);
26623: --
26616: hr_utility.set_location('new_value id '||l_bnft_prvdr_pool_id,222);
26617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26621: 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;
26622: hr_utility.set_location('After plsql table ',222);
26623: --
26624: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26621: 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;
26622: hr_utility.set_location('After plsql table ',222);
26623: --
26624: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26625: --
26620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26621: 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;
26622: hr_utility.set_location('After plsql table ',222);
26623: --
26624: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26625: --
26626: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26627: --
26628: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP.INFORMATION170 || l_suffix,'COPIED');
26622: hr_utility.set_location('After plsql table ',222);
26623: --
26624: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26625: --
26626: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26627: --
26628: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP.INFORMATION170 || l_suffix,'COPIED');
26629: --
26630: else
26624: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26625: --
26626: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26627: --
26628: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP.INFORMATION170 || l_suffix,'COPIED');
26629: --
26630: else
26631: --
26632: -- Call Update routine for the pk_id created in prev run .
26768: end loop;
26769: --
26770: exception when others then
26771: --
26772: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'BPP',l_prefix || r_BPP.information170 || l_suffix) ;
26773: --
26774: end create_BPP_rows;
26775:
26776: ---------------------------------------------------------------
26904: end if ;
26905: -- End Prefix Sufix derivation
26906: for r_ACP_unique in c_unique_ACP('ACP') loop
26907:
26908: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26909: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26910: r_ACP_unique.information3 >=
26911: ben_pd_copy_to_ben_one.g_copy_effective_date)
26912: ) then
26905: -- End Prefix Sufix derivation
26906: for r_ACP_unique in c_unique_ACP('ACP') loop
26907:
26908: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26909: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26910: r_ACP_unique.information3 >=
26911: ben_pd_copy_to_ben_one.g_copy_effective_date)
26912: ) then
26913: --
26907:
26908: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26909: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26910: r_ACP_unique.information3 >=
26911: ben_pd_copy_to_ben_one.g_copy_effective_date)
26912: ) then
26913: --
26914: hr_utility.set_location(' r_ACP_unique.table_route_id '||r_ACP_unique.table_route_id,10);
26915: hr_utility.set_location(' r_ACP_unique.information1 '||r_ACP_unique.information1,10);
26943: l_object_found_in_target := TRUE;
26944: --
26945: if l_process_date between r_ACP_unique.information2 and r_ACP_unique.information3 then
26946: l_update := true;
26947: 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)
26948: 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'
26949: then
26950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
26951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
26944: --
26945: if l_process_date between r_ACP_unique.information2 and r_ACP_unique.information3 then
26946: l_update := true;
26947: 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)
26948: 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'
26949: then
26950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
26951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
26952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
26946: l_update := true;
26947: 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)
26948: 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'
26949: then
26950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
26951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
26952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
26953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26954: 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;
26947: 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)
26948: 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'
26949: then
26950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
26951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
26952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
26953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26954: 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;
26955: --
26948: 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'
26949: then
26950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
26951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
26952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
26953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26954: 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;
26955: --
26956: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26949: then
26950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
26951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
26952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
26953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26954: 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;
26955: --
26956: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26957: --
26950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
26951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
26952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
26953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26954: 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;
26955: --
26956: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26957: --
26958: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26954: 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;
26955: --
26956: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26957: --
26958: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26959: --
26960: --DOUBT log_data('ACP',l_new_value,l_prefix || r_ACP_unique.name|| l_suffix,'REUSED');
26961: --
26962: end if ;
26975: open c_ACP_min_max_dates(r_ACP_unique.table_route_id, r_ACP_unique.information1 ) ;
26976: fetch c_ACP_min_max_dates into l_min_esd,l_max_eed ;
26977: --
26978:
26979: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26980: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26981: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26982: end if;
26983: l_min_esd := greatest(l_min_esd,r_ACP_unique.information2);
26976: fetch c_ACP_min_max_dates into l_min_esd,l_max_eed ;
26977: --
26978:
26979: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26980: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26981: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26982: end if;
26983: l_min_esd := greatest(l_min_esd,r_ACP_unique.information2);
26984: /* open c_ACP(r_ACP_unique.table_route_id,
26977: --
26978:
26979: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26980: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26981: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26982: end if;
26983: l_min_esd := greatest(l_min_esd,r_ACP_unique.information2);
26984: /* open c_ACP(r_ACP_unique.table_route_id,
26985: r_ACP_unique.information1,
27006: p_from_date => l_min_esd,
27007: p_to_date => l_max_eed );
27008: if l_dt_rec_found THEN
27009: --END TEMPIK
27010: 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
27011: 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
27012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27007: p_to_date => l_max_eed );
27008: if l_dt_rec_found THEN
27009: --END TEMPIK
27010: 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
27011: 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
27012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27008: if l_dt_rec_found THEN
27009: --END TEMPIK
27010: 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
27011: 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
27012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27016: 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;
27009: --END TEMPIK
27010: 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
27011: 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
27012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27016: 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;
27017: --
27010: 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
27011: 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
27012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27016: 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;
27017: --
27018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27011: 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
27012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27016: 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;
27017: --
27018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27019: --
27012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27016: 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;
27017: --
27018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27019: --
27020: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27016: 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;
27017: --
27018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27019: --
27020: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27021: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP_unique.name|| l_suffix,'REUSED');
27022: end if ;
27016: 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;
27017: --
27018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27019: --
27020: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27021: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP_unique.name|| l_suffix,'REUSED');
27022: end if ;
27023: --
27024: l_object_found_in_target := true ;
27017: --
27018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27019: --
27020: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27021: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP_unique.name|| l_suffix,'REUSED');
27022: end if ;
27023: --
27024: l_object_found_in_target := true ;
27025: --TEMPIK
27050: l_first_rec := true ;
27051: --
27052: end if ;
27053: --
27054: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_ACRS_PTIP_CVG_F',l_prefix || r_ACP.information170 || l_suffix);
27055: --
27056:
27057: l_effective_date := r_ACP.information2;
27058: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27054: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_ACRS_PTIP_CVG_F',l_prefix || r_ACP.information170 || l_suffix);
27055: --
27056:
27057: l_effective_date := r_ACP.information2;
27058: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27059: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27060: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27061: end if;
27062:
27055: --
27056:
27057: l_effective_date := r_ACP.information2;
27058: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27059: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27060: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27061: end if;
27062:
27063: if l_first_rec and not l_update then
27056:
27057: l_effective_date := r_ACP.information2;
27058: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27059: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27060: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27061: end if;
27062:
27063: if l_first_rec and not l_update then
27064: -- Call Create routine.
27113: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
27114: -- Update all relevent cer records with new pk_id
27115: hr_utility.set_location('Before plsql table ',222);
27116: hr_utility.set_location('new_value id '||l_acrs_ptip_cvg_id,222);
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27121: 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;
27114: -- Update all relevent cer records with new pk_id
27115: hr_utility.set_location('Before plsql table ',222);
27116: hr_utility.set_location('new_value id '||l_acrs_ptip_cvg_id,222);
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27121: 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;
27122: hr_utility.set_location('After plsql table ',222);
27115: hr_utility.set_location('Before plsql table ',222);
27116: hr_utility.set_location('new_value id '||l_acrs_ptip_cvg_id,222);
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27121: 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;
27122: hr_utility.set_location('After plsql table ',222);
27123: --
27116: hr_utility.set_location('new_value id '||l_acrs_ptip_cvg_id,222);
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27121: 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;
27122: hr_utility.set_location('After plsql table ',222);
27123: --
27124: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27121: 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;
27122: hr_utility.set_location('After plsql table ',222);
27123: --
27124: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27125: --
27120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27121: 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;
27122: hr_utility.set_location('After plsql table ',222);
27123: --
27124: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27125: --
27126: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27127: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP.information170|| l_suffix,'COPIED');
27128: --
27122: hr_utility.set_location('After plsql table ',222);
27123: --
27124: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27125: --
27126: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27127: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP.information170|| l_suffix,'COPIED');
27128: --
27129: else
27130: --
27123: --
27124: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27125: --
27126: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27127: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP.information170|| l_suffix,'COPIED');
27128: --
27129: else
27130: --
27131: -- Call Update routine for the pk_id created in prev run .
27238: end loop;
27239: --
27240: exception when others then
27241: --
27242: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ACP',l_prefix || r_ACP.information170 || l_suffix) ;
27243: --
27244: end create_ACP_rows;
27245:
27246: procedure create_final_intersect_rows
27257:
27258: --
27259: -- Create all Service Area Postal Zip Range rows
27260: --
27261: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('SAZ') then
27262: BEN_PD_COPY_TO_BEN_TWO.create_SAZ_rows(
27263: p_validate => p_validate
27264: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27265: ,p_effective_date => p_effective_date
27271: end if;
27272: --
27273: -- Create all oipl rows. Moved these calls to End
27274: --
27275: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('COP') then
27276: BEN_PD_COPY_TO_BEN_TWO.create_COP_rows(
27277: p_validate => p_validate
27278: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27279: ,p_effective_date => p_effective_date
27285: end if;
27286: --
27287: -- Create all DDR rows, which could be attached to opt, oipl, pl levels..
27288: --
27289: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('DDR') then
27290: BEN_PD_COPY_TO_BEN_TWO.create_DDR_rows(
27291: p_validate => p_validate
27292: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27293: ,p_effective_date => p_effective_date
27299: end if;
27300: --
27301: -- Create all DRR rows, which could be attached to DRR rows.
27302: --
27303: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('DRR') then
27304: BEN_PD_COPY_TO_BEN_TWO.create_DRR_rows(
27305: p_validate => p_validate
27306: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27307: ,p_effective_date => p_effective_date
27320: --
27321: -- CPY records are created at PGM and PL level
27322: -- This call creates the intersections between all these levels and yr_perds.
27323: --
27324: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CPY') then
27325: BEN_PD_COPY_TO_BEN_TWO.create_CPY_rows(
27326: p_validate => p_validate
27327: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27328: ,p_effective_date => p_effective_date
27332: ,p_prefix_suffix_cd => p_prefix_suffix_cd
27333: );
27334: end if;
27335: --
27336: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CWG') then
27337: BEN_PD_COPY_TO_BEN_TWO.create_CWG_rows(
27338: p_validate => p_validate
27339: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27340: ,p_effective_date => p_effective_date
27355: --
27356: -- PAT records are created at PGM and PL level
27357: -- This call creates the intersections between all these levels and Action type.
27358: --
27359: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PAT') then
27360: BEN_PD_COPY_TO_BEN_TWO.create_PAT_rows(
27361: p_validate => p_validate
27362: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27363: ,p_effective_date => p_effective_date
27371: --
27372: -- PET records are created at PGM and PL level
27373: -- This call creates the intersections between all these levels and enrt type cycl code.
27374: --
27375: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PET') then
27376: BEN_PD_COPY_TO_BEN_TWO.create_PET_rows(
27377: p_validate => p_validate
27378: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27379: ,p_effective_date => p_effective_date
27386: --
27387: -- ENP records are created at PGM and PL level
27388: -- This call creates the intersections between all these levels and year periods.
27389: --
27390: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ENP') then
27391: BEN_PD_COPY_TO_BEN_TWO.create_ENP_rows(
27392: p_validate => p_validate
27393: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27394: ,p_effective_date => p_effective_date
27402: --
27403: -- LEN records are created at PGM and PL level
27404: -- This call creates the intersections between all these levels and ler.
27405: --
27406: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LEN') then
27407: BEN_PD_COPY_TO_BEN_TWO.create_LEN_rows(
27408: p_validate => p_validate
27409: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27410: ,p_effective_date => p_effective_date
27417: --
27418: --
27419: -- LOP records are created at OIPL and LER level
27420: --
27421: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LOP') then
27422: BEN_PD_COPY_TO_BEN_TWO.create_LOP_rows(
27423: p_validate => p_validate
27424: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27425: ,p_effective_date => p_effective_date
27432: --
27433: --
27434: -- ERP records are created at LEN or ENP level
27435: --
27436: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ERP') then
27437: BEN_PD_COPY_TO_BEN_TWO.create_ERP_rows(
27438: p_validate => p_validate
27439: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27440: ,p_effective_date => p_effective_date
27447: --
27448: --
27449: -- SER records are created at ENP level
27450: --
27451: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('SER') then
27452: BEN_PD_COPY_TO_BEN_TWO.create_SER_rows(
27453: p_validate => p_validate
27454: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27455: ,p_effective_date => p_effective_date
27464: -- ECF records are created at PL and OIPL level
27465: -- This call creates the intersections between all these levels and
27466: -- enrt_ctfn_cd
27467: --
27468: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ECF') then
27469: BEN_PD_COPY_TO_BEN_TWO.create_ECF_rows(
27470: p_validate => p_validate
27471: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27472: ,p_effective_date => p_effective_date
27480: -- CPO records are created at PL and GPM level
27481: -- This call creates the intersections between these levels and
27482: -- Organization
27483: --
27484: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CPO') then
27485: BEN_PD_COPY_TO_BEN_TWO.create_CPO_rows(
27486: p_validate => p_validate
27487: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27488: ,p_effective_date => p_effective_date
27495: -- CPR records are created at CPO level
27496: -- This call creates the child records for the CPO level
27497: --
27498: --
27499: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CPR') then
27500: BEN_PD_COPY_TO_BEN_TWO.create_CPR_rows(
27501: p_validate => p_validate
27502: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27503: ,p_effective_date => p_effective_date
27511: -- RGR records are created at PL and GPM level
27512: -- This call creates the intersections between these levels and
27513: -- reporting group
27514: --
27515: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('RGR') then
27516: BEN_PD_COPY_TO_BEN_TWO.create_RGR_rows(
27517: p_validate => p_validate
27518: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27519: ,p_effective_date => p_effective_date
27527: -- PRG records are created at PL and RGR level
27528: -- This call creates the intersections between these levels and
27529: -- REGN
27530: --
27531: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PRG') then
27532: BEN_PD_COPY_TO_BEN_TWO.create_PRG_rows(
27533: p_validate => p_validate
27534: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27535: ,p_effective_date => p_effective_date
27540: );
27541: end if;
27542:
27543: --
27544: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ACP') then
27545: BEN_PD_COPY_TO_BEN_two.create_ACP_rows
27546: (p_validate => p_validate
27547: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27548: ,p_effective_date => p_effective_date
27555:
27556: -- Start of Intersections for the PTIP
27557: -- CTP records are created at Program and Plan Intersection
27558: --
27559: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CTP') then
27560: BEN_PD_COPY_TO_BEN_TWO.create_CTP_rows(
27561: p_validate => p_validate
27562: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27563: ,p_effective_date => p_effective_date
27570: -- ADE records are created at PGM,PTIP and PL level
27571: -- This call creates the intersections between all these levels and
27572: -- ben_dpnt_cvg_eligy_prfl_f
27573: --
27574: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ADE') then
27575: BEN_PD_COPY_TO_BEN_TWO.create_ADE_rows(
27576: p_validate => p_validate
27577: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27578: ,p_effective_date => p_effective_date
27586: -- LDC records are created at PGM,PTIP and PL level
27587: -- This call creates the intersections between all these levels and
27588: -- ben_ler_f
27589: --
27590: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LDC') then
27591: BEN_PD_COPY_TO_BEN_TWO.create_LDC_rows(
27592: p_validate => p_validate
27593: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27594: ,p_effective_date => p_effective_date
27600: end if;
27601: --
27602: -- LCC records are created at LDC and certification type
27603: --
27604: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LCC') then
27605: BEN_PD_COPY_TO_BEN_TWO.create_LCC_rows(
27606: p_validate => p_validate
27607: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27608: ,p_effective_date => p_effective_date
27613: );
27614: end if;
27615: -- WPT records are created at PTIP and wv_prtn_rsn_cd intersection
27616: --
27617: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('WPT') then
27618: BEN_PD_COPY_TO_BEN_TWO.create_WPT_rows(
27619: p_validate => p_validate
27620: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27621: ,p_effective_date => p_effective_date
27626: );
27627: end if;
27628: -- WCT records are created at WPT and wv_prtn_ctfn_typ_cd intersection
27629: --
27630: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('WCT') then
27631: BEN_PD_COPY_TO_BEN_TWO.create_WCT_rows(
27632: p_validate => p_validate
27633: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27634: ,p_effective_date => p_effective_date
27639: );
27640: end if;
27641: -- LCT records are created at PTIP and LER_ID intersection
27642: --
27643: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LCT') then
27644: BEN_PD_COPY_TO_BEN_TWO.create_LCT_rows(
27645: p_validate => p_validate
27646: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27647: ,p_effective_date => p_effective_date
27652: );
27653: end if;
27654: -- PYD records are created at PTIP and dependent certification type intersection
27655: --
27656: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PYD') then
27657: BEN_PD_COPY_TO_BEN_TWO.create_PYD_rows(
27658: p_validate => p_validate
27659: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27660: ,p_effective_date => p_effective_date
27666: end if;
27667: -- PLIP Rows start here
27668: -- CPP records are created at PGM and PLN intersection
27669: -- XXXPLIP
27670: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CPP') then
27671: BEN_PD_COPY_TO_BEN_TWO.create_CPP_rows(
27672: p_validate => p_validate
27673: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27674: ,p_effective_date => p_effective_date
27679: );
27680: end if;
27681:
27682: -- OIPLIP Always Reuse, never create
27683: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('OPP') then
27684: BEN_PD_COPY_TO_BEN_TWO.create_OPP_rows(
27685: p_validate => p_validate
27686: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27687: ,p_effective_date => p_effective_date
27693: end if;
27694: --
27695: -- OPTIP Always Reuse, never create
27696: /* Commented out for Now - Not Complete
27697: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('OTP') then
27698: BEN_PD_COPY_TO_BEN_TWO.create_OTP_rows(
27699: p_validate => p_validate
27700: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27701: ,p_effective_date => p_effective_date
27709: --
27710: -- Moved call from bepdccp1.pkb so that Benefit Pools are
27711: -- created after PLIP, PTIP and OIPLIP
27712: --
27713: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('BPP') then
27714: BEN_PD_COPY_TO_BEN_TWO.create_BPP_rows(
27715: p_validate => p_validate
27716: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27717: ,p_effective_date => p_effective_date
27724: --
27725:
27726: -- LBR records are created at PLIP and LER intersection
27727: --
27728: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LBR') then
27729: BEN_PD_COPY_TO_BEN_TWO.create_LBR_rows(
27730: p_validate => p_validate
27731: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27732: ,p_effective_date => p_effective_date
27738: end if;
27739: --
27740: -- LPR1 records are created at PLIP and LER intersection
27741: --
27742: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LPR1') then
27743: BEN_PD_COPY_TO_BEN_TWO.create_LPR1_rows(
27744: p_validate => p_validate
27745: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27746: ,p_effective_date => p_effective_date
27752: end if;
27753: -- Plan Intersections
27754: -- VGS records are created at PL and GOS intersection
27755: --
27756: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('VGS') then
27757: BEN_PD_COPY_TO_BEN_TWO.create_VGS_rows(
27758: p_validate => p_validate
27759: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27760: ,p_effective_date => p_effective_date
27765: );
27766: end if;
27767: -- PCT records are created at VGS and certification type intersection
27768: --
27769: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PCT') then
27770: BEN_PD_COPY_TO_BEN_TWO.create_PCT_rows(
27771: p_validate => p_validate
27772: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27773: ,p_effective_date => p_effective_date
27778: );
27779: end if;
27780: -- VRP records as child record of PL
27781: --
27782: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('VRP') then
27783: BEN_PD_COPY_TO_BEN_TWO.create_VRP_rows(
27784: p_validate => p_validate
27785: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27786: ,p_effective_date => p_effective_date
27792: end if;
27793: --
27794: -- WPN records are intersection of PL and wv_prtn_rsn_cd
27795: --
27796: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('WPN') then
27797: BEN_PD_COPY_TO_BEN_TWO.create_WPN_rows(
27798: p_validate => p_validate
27799: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27800: ,p_effective_date => p_effective_date
27805: );
27806: end if;
27807: -- WCN records are intersection of WPN and wv_prtn_ctfn_typ_cd
27808: --
27809: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('WCN') then
27810: BEN_PD_COPY_TO_BEN_TWO.create_WCN_rows(
27811: p_validate => p_validate
27812: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27813: ,p_effective_date => p_effective_date
27819: end if;
27820: --
27821: -- BRC records are intersection of PL and enrt_ctfn_typ_cd
27822: --
27823: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('BRC') then
27824: BEN_PD_COPY_TO_BEN_TWO.create_BRC_rows(
27825: p_validate => p_validate
27826: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27827: ,p_effective_date => p_effective_date
27832: );
27833: end if;
27834: -- LBC records are intersection of ler_bnft_rstrn_id and enrt_ctfn_typ_cd
27835: --
27836: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LBC') then
27837: BEN_PD_COPY_TO_BEN_TWO.create_LBC_rows(
27838: p_validate => p_validate
27839: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27840: ,p_effective_date => p_effective_date
27845: );
27846: end if;
27847: -- LRE records are intersection of PL,OIPL with LER
27848: --
27849: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LRE') then
27850: BEN_PD_COPY_TO_BEN_TWO.create_LRE_rows(
27851: p_validate => p_validate
27852: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27853: ,p_effective_date => p_effective_date
27858: );
27859: end if;
27860: -- LNC records are intersection of LRE and enrt_ctfn_typ_cd
27861: --
27862: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LNC') then
27863: BEN_PD_COPY_TO_BEN_TWO.create_LNC_rows(
27864: p_validate => p_validate
27865: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27866: ,p_effective_date => p_effective_date
27871: );
27872: end if;
27873: -- LPE records are intersection of PLN and LER
27874: --
27875: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LPE') then
27876: BEN_PD_COPY_TO_BEN_TWO.create_LPE_rows(
27877: p_validate => p_validate
27878: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27879: ,p_effective_date => p_effective_date
27884: );
27885: end if;
27886: -- PND records are intersection of PLN and dpnt_cvg_ctfn_typ_cd
27887: --
27888: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PND') then
27889: BEN_PD_COPY_TO_BEN_TWO.create_PND_rows(
27890: p_validate => p_validate
27891: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27892: ,p_effective_date => p_effective_date
27903: -- These records needs to be created at the end of the process.
27904: -- PEO records are created at PGM,PTIP,PLIP,PL and OIPLIP level
27905: -- This call creates the intersections between all these levels and ler.
27906: --
27907: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PEO') then
27908: BEN_PD_COPY_TO_BEN_TWO.create_PEO_rows(
27909: p_validate => p_validate
27910: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27911: ,p_effective_date => p_effective_date
27917: end if;
27918: --
27919: -- EPA records are created at PGM,PTIP,PLIP,PL and OIPLIP level
27920: --
27921: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPA') then
27922: BEN_PD_COPY_TO_BEN_TWO.create_EPA_rows(
27923: p_validate => p_validate
27924: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27925: ,p_effective_date => p_effective_date
27931: end if;
27932: --
27933: -- CEP records are created at the intersection of EPA and ELP
27934: --
27935: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CEP') then
27936: BEN_PD_COPY_TO_BEN_TWO.create_CEP_rows(
27937: p_validate => p_validate
27938: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27939: ,p_effective_date => p_effective_date
27944: );
27945: end if;
27946: -- CER records are created at the intersection of EPA and FORMULA
27947: --
27948: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CER') then
27949: BEN_PD_COPY_TO_BEN_TWO.create_CER_rows(
27950: p_validate => p_validate
27951: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27952: ,p_effective_date => p_effective_date
27957: );
27958: end if;
27959: --
27960: --
27961: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PCX') then
27962: BEN_PD_COPY_TO_BEN_TWO.create_PCX_rows(
27963: p_validate => p_validate
27964: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27965: ,p_effective_date => p_effective_date
27971: end if;
27972: --
27973: -- PCP records are intersection of PLN and ben_pl_pcp
27974: --
27975: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PCP') then
27976: BEN_PD_COPY_TO_BEN_TWO.create_PCP_rows(
27977: p_validate => p_validate
27978: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27979: ,p_effective_date => p_effective_date
27985: end if;
27986: --
27987: -- PTY records are child records of PCP
27988: --
27989: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PTY') then
27990: BEN_PD_COPY_TO_BEN_TWO.create_PTY_rows(
27991: p_validate => p_validate
27992: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27993: ,p_effective_date => p_effective_date
27999: end if;
28000: --
28001: -- PRB records are child records of PLN OR BNR
28002: --
28003: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PRB') then
28004: BEN_PD_COPY_TO_BEN_TWO.create_PRB_rows(
28005: p_validate => p_validate
28006: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28007: ,p_effective_date => p_effective_date
28012: );
28013: end if;
28014: --
28015: --
28016: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PRP') then
28017: BEN_PD_COPY_TO_BEN_TWO.create_PRP_rows(
28018: p_validate => p_validate
28019: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28020: ,p_effective_date => p_effective_date
28052:
28053: end if;
28054:
28055: -- TCS PDW Integration passed the parameter BEN_PD_COPY_TO_BEN_TWO.g_row_type_cd to create_all_leaf_ben_rows
28056: BEN_PD_COPY_TO_BEN_ONE.create_all_leaf_ben_rows(
28057: p_validate => p_validate
28058: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28059: ,p_effective_date => p_effective_date
28060: ,p_prefix_suffix_text => p_prefix_suffix_text
28082: --
28083: -- LGE records are created at Only PGM level
28084: -- This call creates the intersections between the program levels and ler.
28085: --
28086: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LGE') then
28087: BEN_PD_COPY_TO_BEN_TWO.create_LGE_rows(
28088: p_validate => p_validate
28089: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28090: ,p_effective_date => p_effective_date
28097: --
28098: -- PGC records are created at Only PGM level
28099: -- This call creates the intersections between the program levels and dpnt_cvg_ctfn_typ_cd.
28100: --
28101: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PGC') then
28102: BEN_PD_COPY_TO_BEN_TWO.create_PGC_rows(
28103: p_validate => p_validate
28104: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28105: ,p_effective_date => p_effective_date
28192: --
28193: -- To set the Global variable for Mapping data.
28194: set_mapping(p_copy_entity_txn_id) ;
28195: --
28196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
28197: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
28198: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
28199: --
28200: -- Initialize Logging Tables
28193: -- To set the Global variable for Mapping data.
28194: set_mapping(p_copy_entity_txn_id) ;
28195: --
28196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
28197: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
28198: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
28199: --
28200: -- Initialize Logging Tables
28201: BEN_PD_COPY_TO_BEN_ONE.init_log_tbl;
28194: set_mapping(p_copy_entity_txn_id) ;
28195: --
28196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
28197: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
28198: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
28199: --
28200: -- Initialize Logging Tables
28201: BEN_PD_COPY_TO_BEN_ONE.init_log_tbl;
28202: --
28197: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
28198: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
28199: --
28200: -- Initialize Logging Tables
28201: BEN_PD_COPY_TO_BEN_ONE.init_log_tbl;
28202: --
28203:
28204: -- Update information9 to NULL
28205: -- Required for reusing Copy Process
28208: set information9 = null
28209: where copy_entity_txn_id = p_copy_entity_txn_id;
28210:
28211:
28212: BEN_PD_COPY_TO_BEN_ONE.init_table_data_in_cer(p_copy_entity_txn_id);
28213:
28214: -- Initialize global variable for Effective Date to Copy
28215: BEN_PD_COPY_TO_BEN_ONE.g_copy_effective_date := p_effective_date_to_copy;
28216:
28211:
28212: BEN_PD_COPY_TO_BEN_ONE.init_table_data_in_cer(p_copy_entity_txn_id);
28213:
28214: -- Initialize global variable for Effective Date to Copy
28215: BEN_PD_COPY_TO_BEN_ONE.g_copy_effective_date := p_effective_date_to_copy;
28216:
28217: open c_transaction_category(p_copy_entity_txn_id);
28218: fetch c_transaction_category into l_transaction_category;
28219: close c_transaction_category;
28218: fetch c_transaction_category into l_transaction_category;
28219: close c_transaction_category;
28220:
28221: -- Initialize global variable for Transaction Category
28222: BEN_PD_COPY_TO_BEN_ONE.g_transaction_category := l_transaction_category.short_name;
28223:
28224: BEN_PD_COPY_TO_BEN_TWO.create_pgm_intersect_rows(
28225: p_validate => p_validate
28226: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28230: ,p_target_business_group_id => p_target_business_group_id
28231: ,p_prefix_suffix_cd => p_prefix_suffix_cd
28232: );
28233:
28234: BEN_PD_COPY_TO_BEN_ONE.g_copy_effective_date := null;
28235: BEN_PD_COPY_TO_BEN_ONE.g_transaction_category := null;
28236: --
28237: --
28238: end create_stg_to_ben_rows ;
28231: ,p_prefix_suffix_cd => p_prefix_suffix_cd
28232: );
28233:
28234: BEN_PD_COPY_TO_BEN_ONE.g_copy_effective_date := null;
28235: BEN_PD_COPY_TO_BEN_ONE.g_transaction_category := null;
28236: --
28237: --
28238: end create_stg_to_ben_rows ;
28239: --