128: l_counter number;
129: l_ret_id number := null;
130: begin
131: --
132: l_counter := nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.LAST, 0);
133: if l_counter > 0 and p_old_val is not null then
134: for i in 1..l_counter loop
135: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
131: --
132: l_counter := nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.LAST, 0);
133: if l_counter > 0 and p_old_val is not null then
134: for i in 1..l_counter loop
135: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
137: then
138: l_ret_id := BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).new_value;
139: exit;
132: l_counter := nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.LAST, 0);
133: if l_counter > 0 and p_old_val is not null then
134: for i in 1..l_counter loop
135: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
137: then
138: l_ret_id := BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).new_value;
139: exit;
140: end if;
134: for i in 1..l_counter loop
135: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
137: then
138: l_ret_id := BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).new_value;
139: exit;
140: end if;
141: end loop;
142: hr_utility.set_location(' ** In the get_fk ** ',111);
163: --
164: else
165: */
166: --
167: l_counter := nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.LAST, 0);
168: if l_counter > 0 and p_old_val is not null then
169: for i in 1..l_counter loop
170: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
166: --
167: l_counter := nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.LAST, 0);
168: if l_counter > 0 and p_old_val is not null then
169: for i in 1..l_counter loop
170: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
172: then
173: l_ret_id := BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).new_value;
174: exit;
167: l_counter := nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.LAST, 0);
168: if l_counter > 0 and p_old_val is not null then
169: for i in 1..l_counter loop
170: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
172: then
173: l_ret_id := BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).new_value;
174: exit;
175: end if;
169: for i in 1..l_counter loop
170: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
172: then
173: l_ret_id := BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).new_value;
174: exit;
175: end if;
176: end loop;
177: --
192: -- Private procedure to update the cer with target details
193: --
194: -- {End Of Comments}
195: --
196: 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
197: begin
198: hr_utility.set_location('Inside update_cer_with_target ',233);
199: update ben_copy_entity_results
200: set information9 = c_pk_rec.copy_reuse_type||'-'||c_pk_rec.new_value
341: end if ;
342: -- End Prefix Sufix derivation
343: for r_EAN_unique in c_unique_EAN('EAN') loop
344:
345: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
346: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
347: r_EAN_unique.information3 >=
348: ben_pd_copy_to_ben_one.g_copy_effective_date)
349: ) then
342: -- End Prefix Sufix derivation
343: for r_EAN_unique in c_unique_EAN('EAN') loop
344:
345: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
346: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
347: r_EAN_unique.information3 >=
348: ben_pd_copy_to_ben_one.g_copy_effective_date)
349: ) then
350: --
344:
345: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
346: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
347: r_EAN_unique.information3 >=
348: ben_pd_copy_to_ben_one.g_copy_effective_date)
349: ) then
350: --
351: hr_utility.set_location(' r_EAN_unique.table_route_id '||r_EAN_unique.table_route_id,10);
352: hr_utility.set_location(' r_EAN_unique.information1 '||r_EAN_unique.information1,10);
371: fetch c_EAN into r_EAN ;
372: --
373: close c_EAN ;
374: --
375: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
376: l_ASSIGNMENT_SET_ID := r_EAN.information176;
377: else
378: l_ASSIGNMENT_SET_ID := r_EAN.information174;
379: end if;
387: l_object_found_in_target := TRUE;
388: --
389: if l_process_date between r_EAN_unique.information2 and r_EAN_unique.information3 then
390: l_update := true;
391: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
392: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAN_unique.information1 ;
388: --
389: if l_process_date between r_EAN_unique.information2 and r_EAN_unique.information3 then
390: l_update := true;
391: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
392: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAN_unique.information1 ;
396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
389: if l_process_date between r_EAN_unique.information2 and r_EAN_unique.information3 then
390: l_update := true;
391: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
392: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAN_unique.information1 ;
396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
390: l_update := true;
391: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
392: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAN_unique.information1 ;
396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
398: --
391: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
392: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAN_unique.information1 ;
396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
398: --
399: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
392: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAN_unique.information1 ;
396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
398: --
399: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
400: --
393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAN_unique.information1 ;
396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
398: --
399: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
400: --
401: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAN_unique.information1 ;
396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
398: --
399: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
400: --
401: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
402: --
403: -- -- log_data('EAN',l_new_value,l_prefix || r_EAN_unique.name|| l_suffix,'REUSED');
397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
398: --
399: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
400: --
401: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
402: --
403: -- -- log_data('EAN',l_new_value,l_prefix || r_EAN_unique.name|| l_suffix,'REUSED');
404: --
405: end if ;
418: open c_EAN_min_max_dates(r_EAN_unique.table_route_id, r_EAN_unique.information1 ) ;
419: fetch c_EAN_min_max_dates into l_min_esd,l_max_eed ;
420: --
421:
422: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
423: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
424: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
425: end if;
426:
419: fetch c_EAN_min_max_dates into l_min_esd,l_max_eed ;
420: --
421:
422: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
423: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
424: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
425: end if;
426:
427: l_min_esd := greatest(l_min_esd,r_EAN_unique.information2);
420: --
421:
422: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
423: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
424: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
425: end if;
426:
427: l_min_esd := greatest(l_min_esd,r_EAN_unique.information2);
428: /**********************moved up from here **********************
434: fetch c_EAN into r_EAN ;
435: --
436: close c_EAN ;
437: --
438: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
439: l_ASSIGNMENT_SET_ID := r_EAN.information176;
440: else
441: l_ASSIGNMENT_SET_ID := r_EAN.information174;
442: end if;
473: p_from_date => l_min_esd,
474: p_to_date => l_max_eed );
475: if l_dt_rec_found THEN
476: --END TEMPIK
477: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
478: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
474: p_to_date => l_max_eed );
475: if l_dt_rec_found THEN
476: --END TEMPIK
477: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
478: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
475: if l_dt_rec_found THEN
476: --END TEMPIK
477: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
478: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
483: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
476: --END TEMPIK
477: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
478: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
483: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
484: --
477: if r_EAN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
478: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
483: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
484: --
485: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
478: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ASNT_SET_PRTE_ID' then
479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
483: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
484: --
485: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
486: --
479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN_unique.information1 ;
481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
483: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
484: --
485: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
486: --
487: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
483: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
484: --
485: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
486: --
487: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
488: end if ;
489: --
483: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
484: --
485: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
486: --
487: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
488: end if ;
489: --
490: l_object_found_in_target := true ;
491: --TEMPIK
522: end if ;
523: --
524:
525: l_effective_date := r_EAN.information2;
526: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
527: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
528: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
529: end if;
530:
523: --
524:
525: l_effective_date := r_EAN.information2;
526: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
527: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
528: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
529: end if;
530:
531: if l_first_rec and not l_update then
524:
525: l_effective_date := r_EAN.information2;
526: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
527: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
528: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
529: end if;
530:
531: if l_first_rec and not l_update then
532: -- Call Create routine.
586: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
587: -- Update all relevent cer records with new pk_id
588: hr_utility.set_location('Before plsql table ',222);
589: hr_utility.set_location('new_value id '||l_elig_asnt_set_prte_id,222);
590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN.information1 ;
592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ASNT_SET_PRTE_ID ;
593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
587: -- Update all relevent cer records with new pk_id
588: hr_utility.set_location('Before plsql table ',222);
589: hr_utility.set_location('new_value id '||l_elig_asnt_set_prte_id,222);
590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN.information1 ;
592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ASNT_SET_PRTE_ID ;
593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
595: hr_utility.set_location('After plsql table ',222);
588: hr_utility.set_location('Before plsql table ',222);
589: hr_utility.set_location('new_value id '||l_elig_asnt_set_prte_id,222);
590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN.information1 ;
592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ASNT_SET_PRTE_ID ;
593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
595: hr_utility.set_location('After plsql table ',222);
596: --
589: hr_utility.set_location('new_value id '||l_elig_asnt_set_prte_id,222);
590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN.information1 ;
592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ASNT_SET_PRTE_ID ;
593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
595: hr_utility.set_location('After plsql table ',222);
596: --
597: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ASNT_SET_PRTE_ID' ;
591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAN.information1 ;
592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ASNT_SET_PRTE_ID ;
593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
595: hr_utility.set_location('After plsql table ',222);
596: --
597: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
598: --
593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAN_unique.table_route_id;
595: hr_utility.set_location('After plsql table ',222);
596: --
597: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
598: --
599: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
600: --
601: else
595: hr_utility.set_location('After plsql table ',222);
596: --
597: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
598: --
599: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
600: --
601: else
602: --
603: -- Call Update routine for the pk_id created in prev run .
721: end loop;
722: --
723: exception when others then
724: --
725: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EAN',r_EAN.information5 ) ;
726: --
727: end create_EAN_rows;
728:
729: --
881: end if ;
882: -- End Prefix Sufix derivation
883: for r_CGP_unique in c_unique_CGP('CGP') loop
884: --
885: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
886: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
887: r_CGP_unique.information3 >=
888: ben_pd_copy_to_ben_one.g_copy_effective_date)
889: ) then
882: -- End Prefix Sufix derivation
883: for r_CGP_unique in c_unique_CGP('CGP') loop
884: --
885: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
886: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
887: r_CGP_unique.information3 >=
888: ben_pd_copy_to_ben_one.g_copy_effective_date)
889: ) then
890: --
884: --
885: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
886: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
887: r_CGP_unique.information3 >=
888: ben_pd_copy_to_ben_one.g_copy_effective_date)
889: ) then
890: --
891: hr_utility.set_location(' r_CGP_unique.table_route_id '||r_CGP_unique.table_route_id,10);
892: hr_utility.set_location(' r_CGP_unique.information1 '||r_CGP_unique.information1,10);
923: l_object_found_in_target := TRUE;
924: --
925: if l_process_date between r_CGP_unique.information2 and r_CGP_unique.information3 then
926: l_update := true;
927: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
928: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
931: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CGP_unique.information1 ;
924: --
925: if l_process_date between r_CGP_unique.information2 and r_CGP_unique.information3 then
926: l_update := true;
927: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
928: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
931: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CGP_unique.information1 ;
932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
925: if l_process_date between r_CGP_unique.information2 and r_CGP_unique.information3 then
926: l_update := true;
927: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
928: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
931: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CGP_unique.information1 ;
932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
926: l_update := true;
927: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
928: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
931: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CGP_unique.information1 ;
932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
934: --
927: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
928: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
931: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CGP_unique.information1 ;
932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
934: --
935: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
928: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
931: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CGP_unique.information1 ;
932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
934: --
935: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
936: --
929: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
930: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
931: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CGP_unique.information1 ;
932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
934: --
935: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
936: --
937: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
931: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CGP_unique.information1 ;
932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
934: --
935: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
936: --
937: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
938: --
939: -- -- log_data('CGP',l_new_value,l_prefix || r_CGP_unique.name|| l_suffix,'REUSED');
933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
934: --
935: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
936: --
937: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
938: --
939: -- -- log_data('CGP',l_new_value,l_prefix || r_CGP_unique.name|| l_suffix,'REUSED');
940: --
941: end if ;
954: open c_CGP_min_max_dates(r_CGP_unique.table_route_id, r_CGP_unique.information1 ) ;
955: fetch c_CGP_min_max_dates into l_min_esd,l_max_eed ;
956: --
957:
958: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
959: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
960: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
961: end if;
962: l_min_esd := greatest(l_min_esd,r_CGP_unique.information2);
955: fetch c_CGP_min_max_dates into l_min_esd,l_max_eed ;
956: --
957:
958: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
959: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
960: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
961: end if;
962: l_min_esd := greatest(l_min_esd,r_CGP_unique.information2);
963: /* ***Moved up ******
956: --
957:
958: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
959: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
960: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
961: end if;
962: l_min_esd := greatest(l_min_esd,r_CGP_unique.information2);
963: /* ***Moved up ******
964: open c_CGP(r_CGP_unique.table_route_id,
991: p_from_date => l_min_esd,
992: p_to_date => l_max_eed );
993: if l_dt_rec_found THEN
994: --END TEMPIK
995: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
996: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
992: p_to_date => l_max_eed );
993: if l_dt_rec_found THEN
994: --END TEMPIK
995: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
996: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
993: if l_dt_rec_found THEN
994: --END TEMPIK
995: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
996: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
994: --END TEMPIK
995: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
996: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1002: --
995: if r_CGP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
996: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1002: --
1003: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
996: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CNTNG_PRTN_ELIG_PRFL_ID' then
997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1002: --
1003: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1004: --
997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP_unique.information1 ;
999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1002: --
1003: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1004: --
1005: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1002: --
1003: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1004: --
1005: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1006: end if ;
1007: --
1001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1002: --
1003: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1004: --
1005: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1006: end if ;
1007: --
1008: l_object_found_in_target := true ;
1009: --TEMPIK
1035: l_first_rec := true ;
1036: --
1037: end if ;
1038: --
1039: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_CNTNG_PRTN_ELIG_PRFL_F',l_prefix || r_CGP.information170 || l_suffix);
1040: --
1041:
1042: l_effective_date := r_CGP.information2;
1043: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1039: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_CNTNG_PRTN_ELIG_PRFL_F',l_prefix || r_CGP.information170 || l_suffix);
1040: --
1041:
1042: l_effective_date := r_CGP.information2;
1043: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1044: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1045: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1046: end if;
1047:
1040: --
1041:
1042: l_effective_date := r_CGP.information2;
1043: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1044: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1045: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1046: end if;
1047:
1048: if l_first_rec and not l_update then
1041:
1042: l_effective_date := r_CGP.information2;
1043: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1044: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1045: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1046: end if;
1047:
1048: if l_first_rec and not l_update then
1049: -- Call Create routine.
1104: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
1105: -- Update all relevent cer records with new pk_id
1106: hr_utility.set_location('Before plsql table ',222);
1107: hr_utility.set_location('new_value id '||l_cntng_prtn_elig_prfl_id,222);
1108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
1109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP.information1 ;
1110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CNTNG_PRTN_ELIG_PRFL_ID ;
1111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1105: -- Update all relevent cer records with new pk_id
1106: hr_utility.set_location('Before plsql table ',222);
1107: hr_utility.set_location('new_value id '||l_cntng_prtn_elig_prfl_id,222);
1108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
1109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP.information1 ;
1110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CNTNG_PRTN_ELIG_PRFL_ID ;
1111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1113: hr_utility.set_location('After plsql table ',222);
1106: hr_utility.set_location('Before plsql table ',222);
1107: hr_utility.set_location('new_value id '||l_cntng_prtn_elig_prfl_id,222);
1108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
1109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP.information1 ;
1110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CNTNG_PRTN_ELIG_PRFL_ID ;
1111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1113: hr_utility.set_location('After plsql table ',222);
1114: --
1107: hr_utility.set_location('new_value id '||l_cntng_prtn_elig_prfl_id,222);
1108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
1109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP.information1 ;
1110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CNTNG_PRTN_ELIG_PRFL_ID ;
1111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1113: hr_utility.set_location('After plsql table ',222);
1114: --
1115: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CNTNG_PRTN_ELIG_PRFL_ID' ;
1109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CGP.information1 ;
1110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CNTNG_PRTN_ELIG_PRFL_ID ;
1111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1113: hr_utility.set_location('After plsql table ',222);
1114: --
1115: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1116: --
1111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CGP_unique.table_route_id;
1113: hr_utility.set_location('After plsql table ',222);
1114: --
1115: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1116: --
1117: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1118: --
1119: else
1113: hr_utility.set_location('After plsql table ',222);
1114: --
1115: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1116: --
1117: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1118: --
1119: else
1120: --
1121: -- Call Update routine for the pk_id created in prev run .
1233: end loop;
1234: --
1235: exception when others then
1236: --
1237: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CGP',l_prefix || r_CGP.information170 || l_suffix) ;
1238: --
1239: end create_CGP_rows;
1240:
1241: --
1376: end if ;
1377: -- End Prefix Sufix derivation
1378: for r_EAP_unique in c_unique_EAP('EAP') loop
1379:
1380: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1381: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1382: r_EAP_unique.information3 >=
1383: ben_pd_copy_to_ben_one.g_copy_effective_date)
1384: ) then
1377: -- End Prefix Sufix derivation
1378: for r_EAP_unique in c_unique_EAP('EAP') loop
1379:
1380: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1381: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1382: r_EAP_unique.information3 >=
1383: ben_pd_copy_to_ben_one.g_copy_effective_date)
1384: ) then
1385: --
1379:
1380: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1381: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1382: r_EAP_unique.information3 >=
1383: ben_pd_copy_to_ben_one.g_copy_effective_date)
1384: ) then
1385: --
1386: hr_utility.set_location(' r_EAP_unique.table_route_id '||r_EAP_unique.table_route_id,10);
1387: hr_utility.set_location(' r_EAP_unique.information1 '||r_EAP_unique.information1,10);
1416: l_object_found_in_target := TRUE;
1417: --
1418: if l_process_date between r_EAP_unique.information2 and r_EAP_unique.information3 then
1419: l_update := true;
1420: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1421: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAP_unique.information1 ;
1417: --
1418: if l_process_date between r_EAP_unique.information2 and r_EAP_unique.information3 then
1419: l_update := true;
1420: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1421: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAP_unique.information1 ;
1425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1418: if l_process_date between r_EAP_unique.information2 and r_EAP_unique.information3 then
1419: l_update := true;
1420: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1421: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAP_unique.information1 ;
1425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1419: l_update := true;
1420: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1421: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAP_unique.information1 ;
1425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1427: --
1420: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1421: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAP_unique.information1 ;
1425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1427: --
1428: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1421: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAP_unique.information1 ;
1425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1427: --
1428: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1429: --
1422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAP_unique.information1 ;
1425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1427: --
1428: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1429: --
1430: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAP_unique.information1 ;
1425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1427: --
1428: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1429: --
1430: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1431: --
1432: -- -- log_data('EAP',l_new_value,l_prefix || r_EAP_unique.name|| l_suffix,'REUSED');
1426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1427: --
1428: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1429: --
1430: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1431: --
1432: -- -- log_data('EAP',l_new_value,l_prefix || r_EAP_unique.name|| l_suffix,'REUSED');
1433: --
1434: end if ;
1447: open c_EAP_min_max_dates(r_EAP_unique.table_route_id, r_EAP_unique.information1 ) ;
1448: fetch c_EAP_min_max_dates into l_min_esd,l_max_eed ;
1449: --
1450:
1451: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1452: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1453: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1454: end if;
1455: l_min_esd := greatest(l_min_esd,r_EAP_unique.information2);
1448: fetch c_EAP_min_max_dates into l_min_esd,l_max_eed ;
1449: --
1450:
1451: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1452: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1453: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1454: end if;
1455: l_min_esd := greatest(l_min_esd,r_EAP_unique.information2);
1456: /*****************moved from here *******************
1449: --
1450:
1451: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1452: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1453: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1454: end if;
1455: l_min_esd := greatest(l_min_esd,r_EAP_unique.information2);
1456: /*****************moved from here *******************
1457: open c_EAP(r_EAP_unique.table_route_id,
1483: p_from_date => l_min_esd,
1484: p_to_date => l_max_eed );
1485: if l_dt_rec_found THEN
1486: --END TEMPIK
1487: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1488: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1484: p_to_date => l_max_eed );
1485: if l_dt_rec_found THEN
1486: --END TEMPIK
1487: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1488: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1485: if l_dt_rec_found THEN
1486: --END TEMPIK
1487: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1488: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1486: --END TEMPIK
1487: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1488: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1494: --
1487: if r_EAP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1488: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1494: --
1495: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1488: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_PRTE_ID' then
1489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1494: --
1495: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1496: --
1489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP_unique.information1 ;
1491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1494: --
1495: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1496: --
1497: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1494: --
1495: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1496: --
1497: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1498: end if ;
1499: --
1493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1494: --
1495: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1496: --
1497: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1498: end if ;
1499: --
1500: l_object_found_in_target := true ;
1501: --TEMPIK
1529: end if ;
1530: --
1531:
1532: l_effective_date := r_EAP.information2;
1533: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1534: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1535: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1536: end if;
1537:
1530: --
1531:
1532: l_effective_date := r_EAP.information2;
1533: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1534: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1535: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1536: end if;
1537:
1538: if l_first_rec and not l_update then
1531:
1532: l_effective_date := r_EAP.information2;
1533: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1534: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1535: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1536: end if;
1537:
1538: if l_first_rec and not l_update then
1539: -- Call Create routine.
1595: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
1596: -- Update all relevent cer records with new pk_id
1597: hr_utility.set_location('Before plsql table ',222);
1598: hr_utility.set_location('new_value id '||l_elig_age_prte_id,222);
1599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP.information1 ;
1601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_AGE_PRTE_ID ;
1602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1596: -- Update all relevent cer records with new pk_id
1597: hr_utility.set_location('Before plsql table ',222);
1598: hr_utility.set_location('new_value id '||l_elig_age_prte_id,222);
1599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP.information1 ;
1601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_AGE_PRTE_ID ;
1602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1604: hr_utility.set_location('After plsql table ',222);
1597: hr_utility.set_location('Before plsql table ',222);
1598: hr_utility.set_location('new_value id '||l_elig_age_prte_id,222);
1599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP.information1 ;
1601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_AGE_PRTE_ID ;
1602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1604: hr_utility.set_location('After plsql table ',222);
1605: --
1598: hr_utility.set_location('new_value id '||l_elig_age_prte_id,222);
1599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP.information1 ;
1601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_AGE_PRTE_ID ;
1602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1604: hr_utility.set_location('After plsql table ',222);
1605: --
1606: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_PRTE_ID' ;
1600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAP.information1 ;
1601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_AGE_PRTE_ID ;
1602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1604: hr_utility.set_location('After plsql table ',222);
1605: --
1606: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1607: --
1602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAP_unique.table_route_id;
1604: hr_utility.set_location('After plsql table ',222);
1605: --
1606: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1607: --
1608: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1609: --
1610: else
1604: hr_utility.set_location('After plsql table ',222);
1605: --
1606: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1607: --
1608: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1609: --
1610: else
1611: --
1612: -- Call Update routine for the pk_id created in prev run .
1725: end loop;
1726: --
1727: exception when others then
1728: --
1729: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EAP',r_EAP.information5 ) ;
1730: --
1731: end create_EAP_rows;
1732:
1733: --
1867: end if ;
1868: -- End Prefix Sufix derivation
1869: for r_EBN_unique in c_unique_EBN('EBN') loop
1870:
1871: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1872: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1873: r_EBN_unique.information3 >=
1874: ben_pd_copy_to_ben_one.g_copy_effective_date)
1875: ) then
1868: -- End Prefix Sufix derivation
1869: for r_EBN_unique in c_unique_EBN('EBN') loop
1870:
1871: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1872: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1873: r_EBN_unique.information3 >=
1874: ben_pd_copy_to_ben_one.g_copy_effective_date)
1875: ) then
1876: --
1870:
1871: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1872: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1873: r_EBN_unique.information3 >=
1874: ben_pd_copy_to_ben_one.g_copy_effective_date)
1875: ) then
1876: --
1877: hr_utility.set_location(' r_EBN_unique.table_route_id '||r_EBN_unique.table_route_id,10);
1878: hr_utility.set_location(' r_EBN_unique.information1 '||r_EBN_unique.information1,10);
1907: l_object_found_in_target := TRUE;
1908: --
1909: if l_process_date between r_EBN_unique.information2 and r_EBN_unique.information3 then
1910: l_update := true;
1911: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1912: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBN_unique.information1 ;
1908: --
1909: if l_process_date between r_EBN_unique.information2 and r_EBN_unique.information3 then
1910: l_update := true;
1911: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1912: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBN_unique.information1 ;
1916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1909: if l_process_date between r_EBN_unique.information2 and r_EBN_unique.information3 then
1910: l_update := true;
1911: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1912: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBN_unique.information1 ;
1916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1910: l_update := true;
1911: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1912: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBN_unique.information1 ;
1916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1918: --
1911: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1912: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBN_unique.information1 ;
1916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1918: --
1919: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1912: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBN_unique.information1 ;
1916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1918: --
1919: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1920: --
1913: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1914: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBN_unique.information1 ;
1916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1918: --
1919: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1920: --
1921: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBN_unique.information1 ;
1916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1918: --
1919: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1920: --
1921: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1922: --
1923: -- -- log_data('EBN',l_new_value,l_prefix || r_EBN_unique.name|| l_suffix,'REUSED');
1917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1918: --
1919: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1920: --
1921: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1922: --
1923: -- -- log_data('EBN',l_new_value,l_prefix || r_EBN_unique.name|| l_suffix,'REUSED');
1924: --
1925: end if ;
1938: open c_EBN_min_max_dates(r_EBN_unique.table_route_id, r_EBN_unique.information1 ) ;
1939: fetch c_EBN_min_max_dates into l_min_esd,l_max_eed ;
1940: --
1941:
1942: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1943: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1944: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1945: end if;
1946: l_min_esd := greatest(l_min_esd,r_EBN_unique.information2);
1939: fetch c_EBN_min_max_dates into l_min_esd,l_max_eed ;
1940: --
1941:
1942: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1943: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1944: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1945: end if;
1946: l_min_esd := greatest(l_min_esd,r_EBN_unique.information2);
1947: /*********************moved from here *** please see above *****
1940: --
1941:
1942: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1943: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1944: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1945: end if;
1946: l_min_esd := greatest(l_min_esd,r_EBN_unique.information2);
1947: /*********************moved from here *** please see above *****
1948: open c_EBN(r_EBN_unique.table_route_id,
1974: p_from_date => l_min_esd,
1975: p_to_date => l_max_eed );
1976: if l_dt_rec_found THEN
1977: --END TEMPIK
1978: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1979: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1975: p_to_date => l_max_eed );
1976: if l_dt_rec_found THEN
1977: --END TEMPIK
1978: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1979: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1976: if l_dt_rec_found THEN
1977: --END TEMPIK
1978: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1979: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1977: --END TEMPIK
1978: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1979: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1985: --
1978: if r_EBN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
1979: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1985: --
1986: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1979: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BENFTS_GRP_PRTE_ID' then
1980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1985: --
1986: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1987: --
1980: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
1981: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN_unique.information1 ;
1982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1985: --
1986: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1987: --
1988: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1985: --
1986: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1987: --
1988: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1989: end if ;
1990: --
1984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
1985: --
1986: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1987: --
1988: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1989: end if ;
1990: --
1991: l_object_found_in_target := true ;
1992: --TEMPIK
2020: end if ;
2021: --
2022:
2023: l_effective_date := r_EBN.information2;
2024: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2025: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2026: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2027: end if;
2028:
2021: --
2022:
2023: l_effective_date := r_EBN.information2;
2024: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2025: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2026: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2027: end if;
2028:
2029: if l_first_rec and not l_update then
2022:
2023: l_effective_date := r_EBN.information2;
2024: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2025: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2026: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2027: end if;
2028:
2029: if l_first_rec and not l_update then
2030: -- Call Create routine.
2085: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
2086: -- Update all relevent cer records with new pk_id
2087: hr_utility.set_location('Before plsql table ',222);
2088: hr_utility.set_location('new_value id '||l_elig_benfts_grp_prte_id,222);
2089: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
2090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN.information1 ;
2091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BENFTS_GRP_PRTE_ID ;
2092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
2086: -- Update all relevent cer records with new pk_id
2087: hr_utility.set_location('Before plsql table ',222);
2088: hr_utility.set_location('new_value id '||l_elig_benfts_grp_prte_id,222);
2089: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
2090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN.information1 ;
2091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BENFTS_GRP_PRTE_ID ;
2092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
2094: hr_utility.set_location('After plsql table ',222);
2087: hr_utility.set_location('Before plsql table ',222);
2088: hr_utility.set_location('new_value id '||l_elig_benfts_grp_prte_id,222);
2089: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
2090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN.information1 ;
2091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BENFTS_GRP_PRTE_ID ;
2092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
2094: hr_utility.set_location('After plsql table ',222);
2095: --
2088: hr_utility.set_location('new_value id '||l_elig_benfts_grp_prte_id,222);
2089: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
2090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN.information1 ;
2091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BENFTS_GRP_PRTE_ID ;
2092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
2094: hr_utility.set_location('After plsql table ',222);
2095: --
2096: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2089: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BENFTS_GRP_PRTE_ID' ;
2090: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBN.information1 ;
2091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BENFTS_GRP_PRTE_ID ;
2092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
2094: hr_utility.set_location('After plsql table ',222);
2095: --
2096: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2097: --
2092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBN_unique.table_route_id;
2094: hr_utility.set_location('After plsql table ',222);
2095: --
2096: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2097: --
2098: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2099: --
2100: else
2094: hr_utility.set_location('After plsql table ',222);
2095: --
2096: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2097: --
2098: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2099: --
2100: else
2101: --
2102: -- Call Update routine for the pk_id created in prev run .
2215: end loop;
2216: --
2217: exception when others then
2218: --
2219: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EBN',r_EBN.information5 ) ;
2220: --
2221: end create_EBN_rows;
2222:
2223: --
2358: end if ;
2359: -- End Prefix Sufix derivation
2360: for r_EBU_unique in c_unique_EBU('EBU') loop
2361:
2362: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2363: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2364: r_EBU_unique.information3 >=
2365: ben_pd_copy_to_ben_one.g_copy_effective_date)
2366: ) then
2359: -- End Prefix Sufix derivation
2360: for r_EBU_unique in c_unique_EBU('EBU') loop
2361:
2362: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2363: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2364: r_EBU_unique.information3 >=
2365: ben_pd_copy_to_ben_one.g_copy_effective_date)
2366: ) then
2367: --
2361:
2362: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2363: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2364: r_EBU_unique.information3 >=
2365: ben_pd_copy_to_ben_one.g_copy_effective_date)
2366: ) then
2367: --
2368: hr_utility.set_location(' r_EBU_unique.table_route_id '||r_EBU_unique.table_route_id,10);
2369: hr_utility.set_location(' r_EBU_unique.information1 '||r_EBU_unique.information1,10);
2400: l_object_found_in_target := TRUE;
2401: --
2402: if l_process_date between r_EBU_unique.information2 and r_EBU_unique.information3 then
2403: l_update := true;
2404: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2405: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBU_unique.information1 ;
2401: --
2402: if l_process_date between r_EBU_unique.information2 and r_EBU_unique.information3 then
2403: l_update := true;
2404: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2405: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBU_unique.information1 ;
2409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2402: if l_process_date between r_EBU_unique.information2 and r_EBU_unique.information3 then
2403: l_update := true;
2404: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2405: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBU_unique.information1 ;
2409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2410: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2403: l_update := true;
2404: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2405: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBU_unique.information1 ;
2409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2410: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2411: --
2404: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2405: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBU_unique.information1 ;
2409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2410: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2411: --
2412: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2405: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBU_unique.information1 ;
2409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2410: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2411: --
2412: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2413: --
2406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBU_unique.information1 ;
2409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2410: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2411: --
2412: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2413: --
2414: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EBU_unique.information1 ;
2409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2410: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2411: --
2412: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2413: --
2414: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2415: --
2416: -- -- log_data('EBU',l_new_value,l_prefix || r_EBU_unique.name|| l_suffix,'REUSED');
2410: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2411: --
2412: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2413: --
2414: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2415: --
2416: -- -- log_data('EBU',l_new_value,l_prefix || r_EBU_unique.name|| l_suffix,'REUSED');
2417: --
2418: end if ;
2431: open c_EBU_min_max_dates(r_EBU_unique.table_route_id, r_EBU_unique.information1 ) ;
2432: fetch c_EBU_min_max_dates into l_min_esd,l_max_eed ;
2433: --
2434:
2435: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2436: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2437: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2438: end if;
2439: l_min_esd := greatest(l_min_esd,r_EBU_unique.information2);
2432: fetch c_EBU_min_max_dates into l_min_esd,l_max_eed ;
2433: --
2434:
2435: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2436: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2437: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2438: end if;
2439: l_min_esd := greatest(l_min_esd,r_EBU_unique.information2);
2440: /**********************moved above ********************
2433: --
2434:
2435: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2436: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2437: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2438: end if;
2439: l_min_esd := greatest(l_min_esd,r_EBU_unique.information2);
2440: /**********************moved above ********************
2441: open c_EBU(r_EBU_unique.table_route_id,
2467: p_from_date => l_min_esd,
2468: p_to_date => l_max_eed );
2469: if l_dt_rec_found THEN
2470: --END TEMPIK
2471: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2472: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2468: p_to_date => l_max_eed );
2469: if l_dt_rec_found THEN
2470: --END TEMPIK
2471: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2472: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2469: if l_dt_rec_found THEN
2470: --END TEMPIK
2471: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2472: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2470: --END TEMPIK
2471: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2472: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2478: --
2471: if r_EBU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2472: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2478: --
2479: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2472: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_BRGNG_UNIT_PRTE_ID' then
2473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2478: --
2479: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2480: --
2473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU_unique.information1 ;
2475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2478: --
2479: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2480: --
2481: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2478: --
2479: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2480: --
2481: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2482: end if ;
2483: --
2477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2478: --
2479: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2480: --
2481: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2482: end if ;
2483: --
2484: l_object_found_in_target := true ;
2485: --TEMPIK
2513: end if ;
2514: --
2515:
2516: l_effective_date := r_EBU.information2;
2517: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2518: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2519: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2520: end if;
2521:
2514: --
2515:
2516: l_effective_date := r_EBU.information2;
2517: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2518: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2519: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2520: end if;
2521:
2522: if l_first_rec and not l_update then
2515:
2516: l_effective_date := r_EBU.information2;
2517: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2518: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2519: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2520: end if;
2521:
2522: if l_first_rec and not l_update then
2523: -- Call Create routine.
2578: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
2579: -- Update all relevent cer records with new pk_id
2580: hr_utility.set_location('Before plsql table ',222);
2581: hr_utility.set_location('new_value id '||l_elig_brgng_unit_prte_id,222);
2582: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2583: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU.information1 ;
2584: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BRGNG_UNIT_PRTE_ID ;
2585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2579: -- Update all relevent cer records with new pk_id
2580: hr_utility.set_location('Before plsql table ',222);
2581: hr_utility.set_location('new_value id '||l_elig_brgng_unit_prte_id,222);
2582: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2583: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU.information1 ;
2584: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BRGNG_UNIT_PRTE_ID ;
2585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2587: hr_utility.set_location('After plsql table ',222);
2580: hr_utility.set_location('Before plsql table ',222);
2581: hr_utility.set_location('new_value id '||l_elig_brgng_unit_prte_id,222);
2582: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2583: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU.information1 ;
2584: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BRGNG_UNIT_PRTE_ID ;
2585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2587: hr_utility.set_location('After plsql table ',222);
2588: --
2581: hr_utility.set_location('new_value id '||l_elig_brgng_unit_prte_id,222);
2582: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2583: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU.information1 ;
2584: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BRGNG_UNIT_PRTE_ID ;
2585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2587: hr_utility.set_location('After plsql table ',222);
2588: --
2589: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2582: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_BRGNG_UNIT_PRTE_ID' ;
2583: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EBU.information1 ;
2584: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_BRGNG_UNIT_PRTE_ID ;
2585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2587: hr_utility.set_location('After plsql table ',222);
2588: --
2589: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2590: --
2585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EBU_unique.table_route_id;
2587: hr_utility.set_location('After plsql table ',222);
2588: --
2589: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2590: --
2591: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2592: --
2593: else
2587: hr_utility.set_location('After plsql table ',222);
2588: --
2589: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2590: --
2591: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2592: --
2593: else
2594: --
2595: -- Call Update routine for the pk_id created in prev run .
2708: end loop;
2709: --
2710: exception when others then
2711: --
2712: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EBU',r_EBU.information5 ) ;
2713: --
2714: end create_EBU_rows;
2715:
2716: --
2850: end if ;
2851: -- End Prefix Sufix derivation
2852: for r_ECL_unique in c_unique_ECL('ECL') loop
2853:
2854: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2855: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2856: r_ECL_unique.information3 >=
2857: ben_pd_copy_to_ben_one.g_copy_effective_date)
2858: ) then
2851: -- End Prefix Sufix derivation
2852: for r_ECL_unique in c_unique_ECL('ECL') loop
2853:
2854: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2855: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2856: r_ECL_unique.information3 >=
2857: ben_pd_copy_to_ben_one.g_copy_effective_date)
2858: ) then
2859: --
2853:
2854: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2855: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2856: r_ECL_unique.information3 >=
2857: ben_pd_copy_to_ben_one.g_copy_effective_date)
2858: ) then
2859: --
2860: hr_utility.set_location(' r_ECL_unique.table_route_id '||r_ECL_unique.table_route_id,10);
2861: hr_utility.set_location(' r_ECL_unique.information1 '||r_ECL_unique.information1,10);
2890: l_object_found_in_target := TRUE;
2891: --
2892: if l_process_date between r_ECL_unique.information2 and r_ECL_unique.information3 then
2893: l_update := true;
2894: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2895: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECL_unique.information1 ;
2891: --
2892: if l_process_date between r_ECL_unique.information2 and r_ECL_unique.information3 then
2893: l_update := true;
2894: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2895: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECL_unique.information1 ;
2899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2892: if l_process_date between r_ECL_unique.information2 and r_ECL_unique.information3 then
2893: l_update := true;
2894: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2895: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECL_unique.information1 ;
2899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2893: l_update := true;
2894: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2895: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECL_unique.information1 ;
2899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2901: --
2894: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2895: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECL_unique.information1 ;
2899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2901: --
2902: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2895: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECL_unique.information1 ;
2899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2901: --
2902: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2903: --
2896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECL_unique.information1 ;
2899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2901: --
2902: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2903: --
2904: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECL_unique.information1 ;
2899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2901: --
2902: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2903: --
2904: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2905: --
2906: -- -- log_data('ECL',l_new_value,l_prefix || r_ECL_unique.name|| l_suffix,'REUSED');
2900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2901: --
2902: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2903: --
2904: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2905: --
2906: -- -- log_data('ECL',l_new_value,l_prefix || r_ECL_unique.name|| l_suffix,'REUSED');
2907: --
2908: end if ;
2921: open c_ECL_min_max_dates(r_ECL_unique.table_route_id, r_ECL_unique.information1 ) ;
2922: fetch c_ECL_min_max_dates into l_min_esd,l_max_eed ;
2923: --
2924:
2925: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2926: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2927: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2928: end if;
2929: l_min_esd := greatest(l_min_esd,r_ECL_unique.information2);
2922: fetch c_ECL_min_max_dates into l_min_esd,l_max_eed ;
2923: --
2924:
2925: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2926: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2927: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2928: end if;
2929: l_min_esd := greatest(l_min_esd,r_ECL_unique.information2);
2930: /*************************moved above ***************************
2923: --
2924:
2925: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2926: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2927: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2928: end if;
2929: l_min_esd := greatest(l_min_esd,r_ECL_unique.information2);
2930: /*************************moved above ***************************
2931: open c_ECL(r_ECL_unique.table_route_id,
2957: p_from_date => l_min_esd,
2958: p_to_date => l_max_eed );
2959: if l_dt_rec_found THEN
2960: --END TEMPIK
2961: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2962: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2958: p_to_date => l_max_eed );
2959: if l_dt_rec_found THEN
2960: --END TEMPIK
2961: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2962: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2959: if l_dt_rec_found THEN
2960: --END TEMPIK
2961: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2962: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2960: --END TEMPIK
2961: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2962: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2968: --
2961: if r_ECL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
2962: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2968: --
2969: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2962: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMP_LVL_PRTE_ID' then
2963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2968: --
2969: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2970: --
2963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
2964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL_unique.information1 ;
2965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2968: --
2969: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2970: --
2971: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2968: --
2969: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2970: --
2971: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2972: end if ;
2973: --
2967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
2968: --
2969: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2970: --
2971: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2972: end if ;
2973: --
2974: l_object_found_in_target := true ;
2975: --TEMPIK
3003: end if ;
3004: --
3005:
3006: l_effective_date := r_ECL.information2;
3007: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3008: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3009: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3010: end if;
3011:
3004: --
3005:
3006: l_effective_date := r_ECL.information2;
3007: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3008: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3009: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3010: end if;
3011:
3012: if l_first_rec and not l_update then
3005:
3006: l_effective_date := r_ECL.information2;
3007: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3008: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3009: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3010: end if;
3011:
3012: if l_first_rec and not l_update then
3013: -- Call Create routine.
3068: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
3069: -- Update all relevent cer records with new pk_id
3070: hr_utility.set_location('Before plsql table ',222);
3071: hr_utility.set_location('new_value id '||l_elig_comp_lvl_prte_id,222);
3072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
3073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL.information1 ;
3074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMP_LVL_PRTE_ID ;
3075: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
3069: -- Update all relevent cer records with new pk_id
3070: hr_utility.set_location('Before plsql table ',222);
3071: hr_utility.set_location('new_value id '||l_elig_comp_lvl_prte_id,222);
3072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
3073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL.information1 ;
3074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMP_LVL_PRTE_ID ;
3075: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
3077: hr_utility.set_location('After plsql table ',222);
3070: hr_utility.set_location('Before plsql table ',222);
3071: hr_utility.set_location('new_value id '||l_elig_comp_lvl_prte_id,222);
3072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
3073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL.information1 ;
3074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMP_LVL_PRTE_ID ;
3075: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
3077: hr_utility.set_location('After plsql table ',222);
3078: --
3071: hr_utility.set_location('new_value id '||l_elig_comp_lvl_prte_id,222);
3072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
3073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL.information1 ;
3074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMP_LVL_PRTE_ID ;
3075: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
3077: hr_utility.set_location('After plsql table ',222);
3078: --
3079: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMP_LVL_PRTE_ID' ;
3073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECL.information1 ;
3074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMP_LVL_PRTE_ID ;
3075: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
3077: hr_utility.set_location('After plsql table ',222);
3078: --
3079: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3080: --
3075: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECL_unique.table_route_id;
3077: hr_utility.set_location('After plsql table ',222);
3078: --
3079: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3080: --
3081: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3082: --
3083: else
3077: hr_utility.set_location('After plsql table ',222);
3078: --
3079: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3080: --
3081: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3082: --
3083: else
3084: --
3085: -- Call Update routine for the pk_id created in prev run .
3198: end loop;
3199: --
3200: exception when others then
3201: --
3202: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ECL',r_ECL.information5 ) ;
3203: --
3204: end create_ECL_rows;
3205:
3206: --
3340: end if ;
3341: -- End Prefix Sufix derivation
3342: for r_ECP_unique in c_unique_ECP('ECP') loop
3343:
3344: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3345: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3346: r_ECP_unique.information3 >=
3347: ben_pd_copy_to_ben_one.g_copy_effective_date)
3348: ) then
3341: -- End Prefix Sufix derivation
3342: for r_ECP_unique in c_unique_ECP('ECP') loop
3343:
3344: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3345: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3346: r_ECP_unique.information3 >=
3347: ben_pd_copy_to_ben_one.g_copy_effective_date)
3348: ) then
3349: --
3343:
3344: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3345: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3346: r_ECP_unique.information3 >=
3347: ben_pd_copy_to_ben_one.g_copy_effective_date)
3348: ) then
3349: --
3350: hr_utility.set_location(' r_ECP_unique.table_route_id '||r_ECP_unique.table_route_id,10);
3351: hr_utility.set_location(' r_ECP_unique.information1 '||r_ECP_unique.information1,10);
3382: l_object_found_in_target := TRUE;
3383: --
3384: if l_process_date between r_ECP_unique.information2 and r_ECP_unique.information3 then
3385: l_update := true;
3386: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3387: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECP_unique.information1 ;
3383: --
3384: if l_process_date between r_ECP_unique.information2 and r_ECP_unique.information3 then
3385: l_update := true;
3386: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3387: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECP_unique.information1 ;
3391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3384: if l_process_date between r_ECP_unique.information2 and r_ECP_unique.information3 then
3385: l_update := true;
3386: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3387: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECP_unique.information1 ;
3391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3385: l_update := true;
3386: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3387: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECP_unique.information1 ;
3391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3393: --
3386: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3387: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECP_unique.information1 ;
3391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3393: --
3394: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3387: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECP_unique.information1 ;
3391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3393: --
3394: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3395: --
3388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECP_unique.information1 ;
3391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3393: --
3394: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3395: --
3396: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECP_unique.information1 ;
3391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3393: --
3394: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3395: --
3396: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3397: --
3398: -- -- log_data('ECP',l_new_value,l_prefix || r_ECP_unique.name|| l_suffix,'REUSED');
3392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3393: --
3394: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3395: --
3396: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3397: --
3398: -- -- log_data('ECP',l_new_value,l_prefix || r_ECP_unique.name|| l_suffix,'REUSED');
3399: --
3400: end if ;
3413: open c_ECP_min_max_dates(r_ECP_unique.table_route_id, r_ECP_unique.information1 ) ;
3414: fetch c_ECP_min_max_dates into l_min_esd,l_max_eed ;
3415: --
3416:
3417: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3418: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3419: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3420: end if;
3421: l_min_esd := greatest(l_min_esd,r_ECP_unique.information2);
3414: fetch c_ECP_min_max_dates into l_min_esd,l_max_eed ;
3415: --
3416:
3417: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3418: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3419: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3420: end if;
3421: l_min_esd := greatest(l_min_esd,r_ECP_unique.information2);
3422:
3415: --
3416:
3417: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3418: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3419: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3420: end if;
3421: l_min_esd := greatest(l_min_esd,r_ECP_unique.information2);
3422:
3423: /**********************moved above ***************************
3450: p_from_date => l_min_esd,
3451: p_to_date => l_max_eed );
3452: if l_dt_rec_found THEN
3453: --END TEMPIK
3454: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3455: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3451: p_to_date => l_max_eed );
3452: if l_dt_rec_found THEN
3453: --END TEMPIK
3454: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3455: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3452: if l_dt_rec_found THEN
3453: --END TEMPIK
3454: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3455: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3453: --END TEMPIK
3454: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3455: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3461: --
3454: if r_ECP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3455: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3461: --
3462: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3455: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CMBN_AGE_LOS_PRTE_ID' then
3456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3461: --
3462: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3463: --
3456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP_unique.information1 ;
3458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3461: --
3462: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3463: --
3464: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3461: --
3462: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3463: --
3464: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3465: end if ;
3466: --
3460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3461: --
3462: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3463: --
3464: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3465: end if ;
3466: --
3467: l_object_found_in_target := true ;
3468: --TEMPIK
3496: end if ;
3497: --
3498:
3499: l_effective_date := r_ECP.information2;
3500: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3501: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3502: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3503: end if;
3504:
3497: --
3498:
3499: l_effective_date := r_ECP.information2;
3500: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3501: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3502: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3503: end if;
3504:
3505: if l_first_rec and not l_update then
3498:
3499: l_effective_date := r_ECP.information2;
3500: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3501: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3502: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3503: end if;
3504:
3505: if l_first_rec and not l_update then
3506: -- Call Create routine.
3562: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
3563: -- Update all relevent cer records with new pk_id
3564: hr_utility.set_location('Before plsql table ',222);
3565: hr_utility.set_location('new_value id '||l_elig_cmbn_age_los_prte_id,222);
3566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP.information1 ;
3568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CMBN_AGE_LOS_PRTE_ID ;
3569: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3563: -- Update all relevent cer records with new pk_id
3564: hr_utility.set_location('Before plsql table ',222);
3565: hr_utility.set_location('new_value id '||l_elig_cmbn_age_los_prte_id,222);
3566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP.information1 ;
3568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CMBN_AGE_LOS_PRTE_ID ;
3569: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3571: hr_utility.set_location('After plsql table ',222);
3564: hr_utility.set_location('Before plsql table ',222);
3565: hr_utility.set_location('new_value id '||l_elig_cmbn_age_los_prte_id,222);
3566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP.information1 ;
3568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CMBN_AGE_LOS_PRTE_ID ;
3569: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3571: hr_utility.set_location('After plsql table ',222);
3572: --
3565: hr_utility.set_location('new_value id '||l_elig_cmbn_age_los_prte_id,222);
3566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP.information1 ;
3568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CMBN_AGE_LOS_PRTE_ID ;
3569: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3571: hr_utility.set_location('After plsql table ',222);
3572: --
3573: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CMBN_AGE_LOS_PRTE_ID' ;
3567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECP.information1 ;
3568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CMBN_AGE_LOS_PRTE_ID ;
3569: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3571: hr_utility.set_location('After plsql table ',222);
3572: --
3573: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3574: --
3569: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3570: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECP_unique.table_route_id;
3571: hr_utility.set_location('After plsql table ',222);
3572: --
3573: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3574: --
3575: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3576: --
3577: else
3571: hr_utility.set_location('After plsql table ',222);
3572: --
3573: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3574: --
3575: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3576: --
3577: else
3578: --
3579: -- Call Update routine for the pk_id created in prev run .
3693: end loop;
3694: --
3695: exception when others then
3696: --
3697: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ECP',r_ECP.information5 ) ;
3698: --
3699: end create_ECP_rows;
3700:
3701: --
3839: end if ;
3840: -- End Prefix Sufix derivation
3841: for r_ECQ_unique in c_unique_ECQ('ECQ') loop
3842:
3843: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3844: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3845: r_ECQ_unique.information3 >=
3846: ben_pd_copy_to_ben_one.g_copy_effective_date)
3847: ) then
3840: -- End Prefix Sufix derivation
3841: for r_ECQ_unique in c_unique_ECQ('ECQ') loop
3842:
3843: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3844: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3845: r_ECQ_unique.information3 >=
3846: ben_pd_copy_to_ben_one.g_copy_effective_date)
3847: ) then
3848: --
3842:
3843: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3844: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3845: r_ECQ_unique.information3 >=
3846: ben_pd_copy_to_ben_one.g_copy_effective_date)
3847: ) then
3848: --
3849: hr_utility.set_location(' r_ECQ_unique.table_route_id '||r_ECQ_unique.table_route_id,10);
3850: hr_utility.set_location(' r_ECQ_unique.information1 '||r_ECQ_unique.information1,10);
3887: l_object_found_in_target := TRUE;
3888: --
3889: if l_process_date between r_ECQ_unique.information2 and r_ECQ_unique.information3 then
3890: l_update := true;
3891: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3892: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECQ_unique.information1 ;
3888: --
3889: if l_process_date between r_ECQ_unique.information2 and r_ECQ_unique.information3 then
3890: l_update := true;
3891: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3892: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECQ_unique.information1 ;
3896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3889: if l_process_date between r_ECQ_unique.information2 and r_ECQ_unique.information3 then
3890: l_update := true;
3891: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3892: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECQ_unique.information1 ;
3896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3890: l_update := true;
3891: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3892: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECQ_unique.information1 ;
3896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3898: --
3891: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3892: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECQ_unique.information1 ;
3896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3898: --
3899: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3892: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECQ_unique.information1 ;
3896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3898: --
3899: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3900: --
3893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECQ_unique.information1 ;
3896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3898: --
3899: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3900: --
3901: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECQ_unique.information1 ;
3896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3898: --
3899: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3900: --
3901: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3902: --
3903: -- -- log_data('ECQ',l_new_value,l_prefix || r_ECQ_unique.name|| l_suffix,'REUSED');
3897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3898: --
3899: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3900: --
3901: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3902: --
3903: -- -- log_data('ECQ',l_new_value,l_prefix || r_ECQ_unique.name|| l_suffix,'REUSED');
3904: --
3905: end if ;
3918: open c_ECQ_min_max_dates(r_ECQ_unique.table_route_id, r_ECQ_unique.information1 ) ;
3919: fetch c_ECQ_min_max_dates into l_min_esd,l_max_eed ;
3920: --
3921:
3922: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3923: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3924: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3925: end if;
3926: l_min_esd := greatest(l_min_esd,r_ECQ_unique.information2);
3919: fetch c_ECQ_min_max_dates into l_min_esd,l_max_eed ;
3920: --
3921:
3922: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3923: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3924: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3925: end if;
3926: l_min_esd := greatest(l_min_esd,r_ECQ_unique.information2);
3927:
3920: --
3921:
3922: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3923: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3924: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3925: end if;
3926: l_min_esd := greatest(l_min_esd,r_ECQ_unique.information2);
3927:
3928: /**********************moved above ***************************
3961: p_from_date => l_min_esd,
3962: p_to_date => l_max_eed );
3963: if l_dt_rec_found THEN
3964: --END TEMPIK
3965: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3966: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3968: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3969: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3962: p_to_date => l_max_eed );
3963: if l_dt_rec_found THEN
3964: --END TEMPIK
3965: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3966: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3968: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3969: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3963: if l_dt_rec_found THEN
3964: --END TEMPIK
3965: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3966: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3968: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3969: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3964: --END TEMPIK
3965: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3966: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3968: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3969: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3972: --
3965: if r_ECQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
3966: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3968: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3969: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3972: --
3973: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3966: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_CBR_QUALD_BNF_ID' then
3967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3968: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3969: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3972: --
3973: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3974: --
3967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
3968: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ_unique.information1 ;
3969: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3972: --
3973: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3974: --
3975: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3969: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3972: --
3973: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3974: --
3975: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3976: end if ;
3977: --
3971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
3972: --
3973: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3974: --
3975: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3976: end if ;
3977: --
3978: l_object_found_in_target := true ;
3979: --TEMPIK
4007: end if ;
4008: --
4009:
4010: l_effective_date := r_ECQ.information2;
4011: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4012: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4013: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4014: end if;
4015:
4008: --
4009:
4010: l_effective_date := r_ECQ.information2;
4011: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4012: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4013: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4014: end if;
4015:
4016: if l_first_rec and not l_update then
4009:
4010: l_effective_date := r_ECQ.information2;
4011: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4012: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4013: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4014: end if;
4015:
4016: if l_first_rec and not l_update then
4017: -- Call Create routine.
4073: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
4074: -- Update all relevent cer records with new pk_id
4075: hr_utility.set_location('Before plsql table ',222);
4076: hr_utility.set_location('new_value id '||l_elig_cbr_quald_bnf_id,222);
4077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
4078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ.information1 ;
4079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CBR_QUALD_BNF_ID ;
4080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
4074: -- Update all relevent cer records with new pk_id
4075: hr_utility.set_location('Before plsql table ',222);
4076: hr_utility.set_location('new_value id '||l_elig_cbr_quald_bnf_id,222);
4077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
4078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ.information1 ;
4079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CBR_QUALD_BNF_ID ;
4080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
4082: hr_utility.set_location('After plsql table ',222);
4075: hr_utility.set_location('Before plsql table ',222);
4076: hr_utility.set_location('new_value id '||l_elig_cbr_quald_bnf_id,222);
4077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
4078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ.information1 ;
4079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CBR_QUALD_BNF_ID ;
4080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
4082: hr_utility.set_location('After plsql table ',222);
4083: --
4076: hr_utility.set_location('new_value id '||l_elig_cbr_quald_bnf_id,222);
4077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
4078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ.information1 ;
4079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CBR_QUALD_BNF_ID ;
4080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
4082: hr_utility.set_location('After plsql table ',222);
4083: --
4084: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_CBR_QUALD_BNF_ID' ;
4078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECQ.information1 ;
4079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_CBR_QUALD_BNF_ID ;
4080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
4082: hr_utility.set_location('After plsql table ',222);
4083: --
4084: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4085: --
4080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECQ_unique.table_route_id;
4082: hr_utility.set_location('After plsql table ',222);
4083: --
4084: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4085: --
4086: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4087: --
4088: else
4082: hr_utility.set_location('After plsql table ',222);
4083: --
4084: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4085: --
4086: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4087: --
4088: else
4089: --
4090: -- Call Update routine for the pk_id created in prev run .
4204: end loop;
4205: --
4206: exception when others then
4207: --
4208: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ECQ',r_ECQ.information5 ) ;
4209: --
4210: end create_ECQ_rows;
4211:
4212: --
4357: end if ;
4358: -- End Prefix Sufix derivation
4359: for r_ECY_unique in c_unique_ECY('ECY') loop
4360:
4361: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4362: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4363: r_ECY_unique.information3 >=
4364: ben_pd_copy_to_ben_one.g_copy_effective_date)
4365: ) then
4358: -- End Prefix Sufix derivation
4359: for r_ECY_unique in c_unique_ECY('ECY') loop
4360:
4361: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4362: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4363: r_ECY_unique.information3 >=
4364: ben_pd_copy_to_ben_one.g_copy_effective_date)
4365: ) then
4366: --
4360:
4361: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4362: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4363: r_ECY_unique.information3 >=
4364: ben_pd_copy_to_ben_one.g_copy_effective_date)
4365: ) then
4366: --
4367: hr_utility.set_location(' r_ECY_unique.table_route_id '||r_ECY_unique.table_route_id,10);
4368: hr_utility.set_location(' r_ECY_unique.information1 '||r_ECY_unique.information1,10);
4387: fetch c_ECY into r_ECY ;
4388: --
4389: close c_ECY ;
4390: --
4391: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
4392: l_COMPETENCE_ID := r_ECY.INFORMATION176;
4393: l_RATING_LEVEL_ID := r_ECY.INFORMATION180;
4394: else
4395: l_COMPETENCE_ID := r_ECY.INFORMATION174;
4406: l_object_found_in_target := TRUE;
4407: --
4408: if l_process_date between r_ECY_unique.information2 and r_ECY_unique.information3 then
4409: l_update := true;
4410: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4411: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4412: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4413: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECY_unique.information1 ;
4407: --
4408: if l_process_date between r_ECY_unique.information2 and r_ECY_unique.information3 then
4409: l_update := true;
4410: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4411: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4412: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4413: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECY_unique.information1 ;
4415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4408: if l_process_date between r_ECY_unique.information2 and r_ECY_unique.information3 then
4409: l_update := true;
4410: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4411: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4412: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4413: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECY_unique.information1 ;
4415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4409: l_update := true;
4410: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4411: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4412: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4413: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECY_unique.information1 ;
4415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4417: --
4410: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4411: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4412: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4413: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECY_unique.information1 ;
4415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4417: --
4418: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4411: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4412: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4413: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECY_unique.information1 ;
4415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4417: --
4418: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4419: --
4412: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4413: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECY_unique.information1 ;
4415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4417: --
4418: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4419: --
4420: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECY_unique.information1 ;
4415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4417: --
4418: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4419: --
4420: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4421: --
4422: -- -- log_data('ECY',l_new_value,l_prefix || r_ECY_unique.name|| l_suffix,'REUSED');
4416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4417: --
4418: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4419: --
4420: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4421: --
4422: -- -- log_data('ECY',l_new_value,l_prefix || r_ECY_unique.name|| l_suffix,'REUSED');
4423: --
4424: end if ;
4437: open c_ECY_min_max_dates(r_ECY_unique.table_route_id, r_ECY_unique.information1 ) ;
4438: fetch c_ECY_min_max_dates into l_min_esd,l_max_eed ;
4439: --
4440:
4441: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4442: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4443: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4444: end if;
4445: l_min_esd := greatest(l_min_esd,r_ECY_unique.information2);
4438: fetch c_ECY_min_max_dates into l_min_esd,l_max_eed ;
4439: --
4440:
4441: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4442: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4443: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4444: end if;
4445: l_min_esd := greatest(l_min_esd,r_ECY_unique.information2);
4446:
4439: --
4440:
4441: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4442: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4443: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4444: end if;
4445: l_min_esd := greatest(l_min_esd,r_ECY_unique.information2);
4446:
4447: /**********************moved above ***************************
4453: fetch c_ECY into r_ECY ;
4454: --
4455: close c_ECY ;
4456: --
4457: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
4458: l_COMPETENCE_ID := r_ECY.INFORMATION176;
4459: l_RATING_LEVEL_ID := r_ECY.INFORMATION180;
4460: else
4461: l_COMPETENCE_ID := r_ECY.INFORMATION174;
4497: p_from_date => l_min_esd,
4498: p_to_date => l_max_eed );
4499: if l_dt_rec_found THEN
4500: --END TEMPIK
4501: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4502: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4498: p_to_date => l_max_eed );
4499: if l_dt_rec_found THEN
4500: --END TEMPIK
4501: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4502: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4499: if l_dt_rec_found THEN
4500: --END TEMPIK
4501: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4502: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4500: --END TEMPIK
4501: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4502: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4508: --
4501: if r_ECY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
4502: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4508: --
4509: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4502: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_COMPTNCY_PRTE_ID' then
4503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4508: --
4509: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4510: --
4503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY_unique.information1 ;
4505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4508: --
4509: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4510: --
4511: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4508: --
4509: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4510: --
4511: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4512: end if ;
4513: --
4507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4508: --
4509: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4510: --
4511: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4512: end if ;
4513: --
4514: l_object_found_in_target := true ;
4515: --TEMPIK
4547: end if ;
4548: --
4549:
4550: l_effective_date := r_ECY.information2;
4551: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4552: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4553: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4554: end if;
4555:
4548: --
4549:
4550: l_effective_date := r_ECY.information2;
4551: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4552: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4553: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4554: end if;
4555:
4556: if l_first_rec and not l_update then
4549:
4550: l_effective_date := r_ECY.information2;
4551: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4552: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4553: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4554: end if;
4555:
4556: if l_first_rec and not l_update then
4557: -- Call Create routine.
4613: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
4614: -- Update all relevent cer records with new pk_id
4615: hr_utility.set_location('Before plsql table ',222);
4616: hr_utility.set_location('new_value id '||l_elig_comptncy_prte_id,222);
4617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY.information1 ;
4619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMPTNCY_PRTE_ID ;
4620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4621: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4614: -- Update all relevent cer records with new pk_id
4615: hr_utility.set_location('Before plsql table ',222);
4616: hr_utility.set_location('new_value id '||l_elig_comptncy_prte_id,222);
4617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY.information1 ;
4619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMPTNCY_PRTE_ID ;
4620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4621: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4622: hr_utility.set_location('After plsql table ',222);
4615: hr_utility.set_location('Before plsql table ',222);
4616: hr_utility.set_location('new_value id '||l_elig_comptncy_prte_id,222);
4617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY.information1 ;
4619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMPTNCY_PRTE_ID ;
4620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4621: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4622: hr_utility.set_location('After plsql table ',222);
4623: --
4616: hr_utility.set_location('new_value id '||l_elig_comptncy_prte_id,222);
4617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY.information1 ;
4619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMPTNCY_PRTE_ID ;
4620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4621: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4622: hr_utility.set_location('After plsql table ',222);
4623: --
4624: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_COMPTNCY_PRTE_ID' ;
4618: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECY.information1 ;
4619: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_COMPTNCY_PRTE_ID ;
4620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4621: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4622: hr_utility.set_location('After plsql table ',222);
4623: --
4624: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4625: --
4620: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4621: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECY_unique.table_route_id;
4622: hr_utility.set_location('After plsql table ',222);
4623: --
4624: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4625: --
4626: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4627: --
4628: else /* l_first_rec and not l_update */
4622: hr_utility.set_location('After plsql table ',222);
4623: --
4624: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4625: --
4626: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4627: --
4628: else /* l_first_rec and not l_update */
4629: --
4630: -- Call Update routine for the pk_id created in prev run .
4826:
4827: --
4828: exception when others then
4829: --
4830: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ECY',r_ECY.information5 ) ;
4831: --
4832: end create_ECY_rows;
4833:
4834: --
4971: end if ;
4972: -- End Prefix Sufix derivation
4973: for r_EDG_unique in c_unique_EDG('EDG') loop
4974:
4975: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4976: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4977: r_EDG_unique.information3 >=
4978: ben_pd_copy_to_ben_one.g_copy_effective_date)
4979: ) then
4972: -- End Prefix Sufix derivation
4973: for r_EDG_unique in c_unique_EDG('EDG') loop
4974:
4975: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4976: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4977: r_EDG_unique.information3 >=
4978: ben_pd_copy_to_ben_one.g_copy_effective_date)
4979: ) then
4980: --
4974:
4975: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4976: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4977: r_EDG_unique.information3 >=
4978: ben_pd_copy_to_ben_one.g_copy_effective_date)
4979: ) then
4980: --
4981: hr_utility.set_location(' r_EDG_unique.table_route_id '||r_EDG_unique.table_route_id,10);
4982: hr_utility.set_location(' r_EDG_unique.information1 '||r_EDG_unique.information1,10);
5016: l_object_found_in_target := TRUE;
5017: --
5018: if l_process_date between r_EDG_unique.information2 and r_EDG_unique.information3 then
5019: l_update := true;
5020: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDG_unique.information1 ;
5017: --
5018: if l_process_date between r_EDG_unique.information2 and r_EDG_unique.information3 then
5019: l_update := true;
5020: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDG_unique.information1 ;
5025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5018: if l_process_date between r_EDG_unique.information2 and r_EDG_unique.information3 then
5019: l_update := true;
5020: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDG_unique.information1 ;
5025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5019: l_update := true;
5020: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDG_unique.information1 ;
5025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5027: --
5020: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDG_unique.information1 ;
5025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5027: --
5028: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDG_unique.information1 ;
5025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5027: --
5028: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5029: --
5022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDG_unique.information1 ;
5025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5027: --
5028: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5029: --
5030: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDG_unique.information1 ;
5025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5027: --
5028: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5029: --
5030: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5031: --
5032: -- log_data('EDG',l_new_value,l_prefix || r_EDG_unique.name|| l_suffix,'REUSED');
5026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5027: --
5028: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5029: --
5030: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5031: --
5032: -- log_data('EDG',l_new_value,l_prefix || r_EDG_unique.name|| l_suffix,'REUSED');
5033: --
5034: end if ;
5047: open c_EDG_min_max_dates(r_EDG_unique.table_route_id, r_EDG_unique.information1 ) ;
5048: fetch c_EDG_min_max_dates into l_min_esd,l_max_eed ;
5049: --
5050:
5051: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5052: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5053: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5054: end if;
5055: l_min_esd := greatest(l_min_esd,r_EDG_unique.information2);
5048: fetch c_EDG_min_max_dates into l_min_esd,l_max_eed ;
5049: --
5050:
5051: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5052: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5053: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5054: end if;
5055: l_min_esd := greatest(l_min_esd,r_EDG_unique.information2);
5056: /**********************moved up from here **********************
5049: --
5050:
5051: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5052: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5053: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5054: end if;
5055: l_min_esd := greatest(l_min_esd,r_EDG_unique.information2);
5056: /**********************moved up from here **********************
5057: open c_EDG(r_EDG_unique.table_route_id,
5087: p_from_date => l_min_esd,
5088: p_to_date => l_max_eed );
5089: if l_dt_rec_found THEN
5090: --END TEMPIK
5091: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5088: p_to_date => l_max_eed );
5089: if l_dt_rec_found THEN
5090: --END TEMPIK
5091: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5089: if l_dt_rec_found THEN
5090: --END TEMPIK
5091: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5090: --END TEMPIK
5091: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5098: --
5091: if r_EDG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5098: --
5099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PGM_ID' then
5093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5098: --
5099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5100: --
5093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG_unique.information1 ;
5095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5098: --
5099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5100: --
5101: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5098: --
5099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5100: --
5101: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5102: end if ;
5103: --
5097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5098: --
5099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5100: --
5101: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5102: end if ;
5103: --
5104: l_object_found_in_target := true ;
5105: --TEMPIK
5133: end if ;
5134: --
5135:
5136: l_effective_date := r_EDG.information2;
5137: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5138: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5139: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5140: end if;
5141:
5134: --
5135:
5136: l_effective_date := r_EDG.information2;
5137: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5138: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5139: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5140: end if;
5141:
5142: if l_first_rec and not l_update then
5135:
5136: l_effective_date := r_EDG.information2;
5137: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5138: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5139: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5140: end if;
5141:
5142: if l_first_rec and not l_update then
5143: -- Call Create routine.
5198: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
5199: -- Update all relevent cer records with new pk_id
5200: hr_utility.set_location('Before plsql table ',222);
5201: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_pgm_id,222);
5202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG.information1 ;
5204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PGM_ID ;
5205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5199: -- Update all relevent cer records with new pk_id
5200: hr_utility.set_location('Before plsql table ',222);
5201: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_pgm_id,222);
5202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG.information1 ;
5204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PGM_ID ;
5205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5207: hr_utility.set_location('After plsql table ',222);
5200: hr_utility.set_location('Before plsql table ',222);
5201: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_pgm_id,222);
5202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG.information1 ;
5204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PGM_ID ;
5205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5207: hr_utility.set_location('After plsql table ',222);
5208: --
5201: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_pgm_id,222);
5202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG.information1 ;
5204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PGM_ID ;
5205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5207: hr_utility.set_location('After plsql table ',222);
5208: --
5209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PGM_ID' ;
5203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDG.information1 ;
5204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PGM_ID ;
5205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5207: hr_utility.set_location('After plsql table ',222);
5208: --
5209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5210: --
5205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDG_unique.table_route_id;
5207: hr_utility.set_location('After plsql table ',222);
5208: --
5209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5210: --
5211: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5212: --
5213: else
5207: hr_utility.set_location('After plsql table ',222);
5208: --
5209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5210: --
5211: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5212: --
5213: else
5214: --
5215: -- Call Update routine for the pk_id created in prev run .
5328: end loop;
5329: --
5330: exception when others then
5331: --
5332: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EDG',r_EDG.information5 ) ;
5333: --
5334: end create_EDG_rows;
5335:
5336: --
5474: end if ;
5475: -- End Prefix Sufix derivation
5476: for r_EDI_unique in c_unique_EDI('EDI') loop
5477:
5478: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5479: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5480: r_EDI_unique.information3 >=
5481: ben_pd_copy_to_ben_one.g_copy_effective_date)
5482: ) then
5475: -- End Prefix Sufix derivation
5476: for r_EDI_unique in c_unique_EDI('EDI') loop
5477:
5478: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5479: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5480: r_EDI_unique.information3 >=
5481: ben_pd_copy_to_ben_one.g_copy_effective_date)
5482: ) then
5483: --
5477:
5478: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5479: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5480: r_EDI_unique.information3 >=
5481: ben_pd_copy_to_ben_one.g_copy_effective_date)
5482: ) then
5483: --
5484: hr_utility.set_location(' r_EDI_unique.table_route_id '||r_EDI_unique.table_route_id,10);
5485: hr_utility.set_location(' r_EDI_unique.information1 '||r_EDI_unique.information1,10);
5520: l_object_found_in_target := TRUE;
5521: --
5522: if l_process_date between r_EDI_unique.information2 and r_EDI_unique.information3 then
5523: l_update := true;
5524: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5525: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDI_unique.information1 ;
5521: --
5522: if l_process_date between r_EDI_unique.information2 and r_EDI_unique.information3 then
5523: l_update := true;
5524: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5525: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDI_unique.information1 ;
5529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5522: if l_process_date between r_EDI_unique.information2 and r_EDI_unique.information3 then
5523: l_update := true;
5524: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5525: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDI_unique.information1 ;
5529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5523: l_update := true;
5524: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5525: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDI_unique.information1 ;
5529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5531: --
5524: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5525: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDI_unique.information1 ;
5529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5531: --
5532: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5525: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDI_unique.information1 ;
5529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5531: --
5532: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5533: --
5526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDI_unique.information1 ;
5529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5531: --
5532: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5533: --
5534: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDI_unique.information1 ;
5529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5531: --
5532: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5533: --
5534: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5535: --
5536: -- log_data('EDI',l_new_value,l_prefix || r_EDI_unique.name|| l_suffix,'REUSED');
5530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5531: --
5532: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5533: --
5534: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5535: --
5536: -- log_data('EDI',l_new_value,l_prefix || r_EDI_unique.name|| l_suffix,'REUSED');
5537: --
5538: end if ;
5551: open c_EDI_min_max_dates(r_EDI_unique.table_route_id, r_EDI_unique.information1 ) ;
5552: fetch c_EDI_min_max_dates into l_min_esd,l_max_eed ;
5553: --
5554:
5555: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5556: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5557: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5558: end if;
5559: l_min_esd := greatest(l_min_esd,r_EDI_unique.information2);
5552: fetch c_EDI_min_max_dates into l_min_esd,l_max_eed ;
5553: --
5554:
5555: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5556: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5557: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5558: end if;
5559: l_min_esd := greatest(l_min_esd,r_EDI_unique.information2);
5560: /**********************moved up from here **********************
5553: --
5554:
5555: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5556: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5557: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5558: end if;
5559: l_min_esd := greatest(l_min_esd,r_EDI_unique.information2);
5560: /**********************moved up from here **********************
5561:
5593: p_from_date => l_min_esd,
5594: p_to_date => l_max_eed );
5595: if l_dt_rec_found THEN
5596: --END TEMPIK
5597: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5598: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5594: p_to_date => l_max_eed );
5595: if l_dt_rec_found THEN
5596: --END TEMPIK
5597: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5598: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5595: if l_dt_rec_found THEN
5596: --END TEMPIK
5597: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5598: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5596: --END TEMPIK
5597: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5598: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5604: --
5597: if r_EDI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
5598: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5604: --
5605: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5598: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_PLIP_ID' then
5599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5604: --
5605: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5606: --
5599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI_unique.information1 ;
5601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5604: --
5605: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5606: --
5607: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5601: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5602: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5604: --
5605: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5606: --
5607: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5608: end if ;
5609: --
5603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5604: --
5605: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5606: --
5607: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5608: end if ;
5609: --
5610: l_object_found_in_target := true ;
5611: --TEMPIK
5639: end if ;
5640: --
5641:
5642: l_effective_date := r_EDI.information2;
5643: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5644: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5645: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5646: end if;
5647:
5640: --
5641:
5642: l_effective_date := r_EDI.information2;
5643: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5644: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5645: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5646: end if;
5647:
5648: if l_first_rec and not l_update then
5641:
5642: l_effective_date := r_EDI.information2;
5643: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5644: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5645: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5646: end if;
5647:
5648: if l_first_rec and not l_update then
5649: -- Call Create routine.
5703: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
5704: -- Update all relevent cer records with new pk_id
5705: hr_utility.set_location('Before plsql table ',222);
5706: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_plip_id,222);
5707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI.information1 ;
5709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_PLIP_ID ;
5710: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5711: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5704: -- Update all relevent cer records with new pk_id
5705: hr_utility.set_location('Before plsql table ',222);
5706: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_plip_id,222);
5707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI.information1 ;
5709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_PLIP_ID ;
5710: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5711: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5712: hr_utility.set_location('After plsql table ',222);
5705: hr_utility.set_location('Before plsql table ',222);
5706: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_plip_id,222);
5707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI.information1 ;
5709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_PLIP_ID ;
5710: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5711: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5712: hr_utility.set_location('After plsql table ',222);
5713: --
5706: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_plip_id,222);
5707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI.information1 ;
5709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_PLIP_ID ;
5710: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5711: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5712: hr_utility.set_location('After plsql table ',222);
5713: --
5714: -- update_cer_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: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_PLIP_ID' ;
5708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDI.information1 ;
5709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_PLIP_ID ;
5710: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5711: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5712: hr_utility.set_location('After plsql table ',222);
5713: --
5714: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5715: --
5710: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5711: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDI_unique.table_route_id;
5712: hr_utility.set_location('After plsql table ',222);
5713: --
5714: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5715: --
5716: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5717: --
5718: else
5712: hr_utility.set_location('After plsql table ',222);
5713: --
5714: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5715: --
5716: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5717: --
5718: else
5719: --
5720: -- Call Update routine for the pk_id created in prev run .
5832: end loop;
5833: --
5834: exception when others then
5835: --
5836: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EDI',r_EDI.information5 ) ;
5837: --
5838: end create_EDI_rows;
5839:
5840: --
5977: end if ;
5978: -- End Prefix Sufix derivation
5979: for r_EDP_unique in c_unique_EDP('EDP') loop
5980:
5981: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5982: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5983: r_EDP_unique.information3 >=
5984: ben_pd_copy_to_ben_one.g_copy_effective_date)
5985: ) then
5978: -- End Prefix Sufix derivation
5979: for r_EDP_unique in c_unique_EDP('EDP') loop
5980:
5981: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5982: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5983: r_EDP_unique.information3 >=
5984: ben_pd_copy_to_ben_one.g_copy_effective_date)
5985: ) then
5986: --
5980:
5981: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5982: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5983: r_EDP_unique.information3 >=
5984: ben_pd_copy_to_ben_one.g_copy_effective_date)
5985: ) then
5986: --
5987: hr_utility.set_location(' r_EDP_unique.table_route_id '||r_EDP_unique.table_route_id,10);
5988: hr_utility.set_location(' r_EDP_unique.information1 '||r_EDP_unique.information1,10);
6020: l_object_found_in_target := TRUE;
6021: --
6022: if l_process_date between r_EDP_unique.information2 and r_EDP_unique.information3 then
6023: l_update := true;
6024: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6025: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDP_unique.information1 ;
6021: --
6022: if l_process_date between r_EDP_unique.information2 and r_EDP_unique.information3 then
6023: l_update := true;
6024: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6025: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDP_unique.information1 ;
6029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6022: if l_process_date between r_EDP_unique.information2 and r_EDP_unique.information3 then
6023: l_update := true;
6024: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6025: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDP_unique.information1 ;
6029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6023: l_update := true;
6024: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6025: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDP_unique.information1 ;
6029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6031: --
6024: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6025: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDP_unique.information1 ;
6029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6031: --
6032: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6025: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDP_unique.information1 ;
6029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6031: --
6032: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6033: --
6026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDP_unique.information1 ;
6029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6031: --
6032: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6033: --
6034: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDP_unique.information1 ;
6029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6031: --
6032: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6033: --
6034: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6035: --
6036: -- log_data('EDP',l_new_value,l_prefix || r_EDP_unique.name|| l_suffix,'REUSED');
6030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6031: --
6032: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6033: --
6034: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6035: --
6036: -- log_data('EDP',l_new_value,l_prefix || r_EDP_unique.name|| l_suffix,'REUSED');
6037: --
6038: end if ;
6051: open c_EDP_min_max_dates(r_EDP_unique.table_route_id, r_EDP_unique.information1 ) ;
6052: fetch c_EDP_min_max_dates into l_min_esd,l_max_eed ;
6053: --
6054:
6055: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6056: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6057: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6058: end if;
6059: l_min_esd := greatest(l_min_esd,r_EDP_unique.information2);
6052: fetch c_EDP_min_max_dates into l_min_esd,l_max_eed ;
6053: --
6054:
6055: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6056: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6057: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6058: end if;
6059: l_min_esd := greatest(l_min_esd,r_EDP_unique.information2);
6060: /**********************moved up from here **********************
6053: --
6054:
6055: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6056: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6057: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6058: end if;
6059: l_min_esd := greatest(l_min_esd,r_EDP_unique.information2);
6060: /**********************moved up from here **********************
6061: open c_EDP(r_EDP_unique.table_route_id,
6092: p_from_date => l_min_esd,
6093: p_to_date => l_max_eed );
6094: if l_dt_rec_found THEN
6095: --END TEMPIK
6096: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6097: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6093: p_to_date => l_max_eed );
6094: if l_dt_rec_found THEN
6095: --END TEMPIK
6096: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6097: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6094: if l_dt_rec_found THEN
6095: --END TEMPIK
6096: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6097: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6095: --END TEMPIK
6096: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6097: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6103: --
6096: if r_EDP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6097: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6103: --
6104: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6097: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PL_ID' then
6098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6103: --
6104: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6105: --
6098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6099: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP_unique.information1 ;
6100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6103: --
6104: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6105: --
6106: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6100: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6101: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6103: --
6104: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6105: --
6106: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6107: end if ;
6108: --
6102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6103: --
6104: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6105: --
6106: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6107: end if ;
6108: --
6109: l_object_found_in_target := true ;
6110: --TEMPIK
6138: end if ;
6139: --
6140:
6141: l_effective_date := r_EDP.information2;
6142: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6143: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6144: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6145: end if;
6146:
6139: --
6140:
6141: l_effective_date := r_EDP.information2;
6142: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6143: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6144: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6145: end if;
6146:
6147: if l_first_rec and not l_update then
6140:
6141: l_effective_date := r_EDP.information2;
6142: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6143: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6144: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6145: end if;
6146:
6147: if l_first_rec and not l_update then
6148: -- Call Create routine.
6202: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
6203: -- Update all relevent cer records with new pk_id
6204: hr_utility.set_location('Before plsql table ',222);
6205: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_pl_id,222);
6206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP.information1 ;
6208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PL_ID ;
6209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6203: -- Update all relevent cer records with new pk_id
6204: hr_utility.set_location('Before plsql table ',222);
6205: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_pl_id,222);
6206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP.information1 ;
6208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PL_ID ;
6209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6211: hr_utility.set_location('After plsql table ',222);
6204: hr_utility.set_location('Before plsql table ',222);
6205: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_pl_id,222);
6206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP.information1 ;
6208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PL_ID ;
6209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6211: hr_utility.set_location('After plsql table ',222);
6212: --
6205: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_pl_id,222);
6206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP.information1 ;
6208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PL_ID ;
6209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6211: hr_utility.set_location('After plsql table ',222);
6212: --
6213: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PL_ID' ;
6207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDP.information1 ;
6208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PL_ID ;
6209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6211: hr_utility.set_location('After plsql table ',222);
6212: --
6213: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6214: --
6209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDP_unique.table_route_id;
6211: hr_utility.set_location('After plsql table ',222);
6212: --
6213: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6214: --
6215: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6216: --
6217: else
6211: hr_utility.set_location('After plsql table ',222);
6212: --
6213: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6214: --
6215: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6216: --
6217: else
6218: --
6219: -- Call Update routine for the pk_id created in prev run .
6331: end loop;
6332: --
6333: exception when others then
6334: --
6335: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EDP',r_EDP.information5 ) ;
6336: --
6337: end create_EDP_rows;
6338:
6339: --
6476: end if ;
6477: -- End Prefix Sufix derivation
6478: for r_EDT_unique in c_unique_EDT('EDT') loop
6479:
6480: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6481: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6482: r_EDT_unique.information3 >=
6483: ben_pd_copy_to_ben_one.g_copy_effective_date)
6484: ) then
6477: -- End Prefix Sufix derivation
6478: for r_EDT_unique in c_unique_EDT('EDT') loop
6479:
6480: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6481: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6482: r_EDT_unique.information3 >=
6483: ben_pd_copy_to_ben_one.g_copy_effective_date)
6484: ) then
6485: --
6479:
6480: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6481: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6482: r_EDT_unique.information3 >=
6483: ben_pd_copy_to_ben_one.g_copy_effective_date)
6484: ) then
6485: --
6486: hr_utility.set_location(' r_EDT_unique.table_route_id '||r_EDT_unique.table_route_id,10);
6487: hr_utility.set_location(' r_EDT_unique.information1 '||r_EDT_unique.information1,10);
6519: l_object_found_in_target := TRUE;
6520: --
6521: if l_process_date between r_EDT_unique.information2 and r_EDT_unique.information3 then
6522: l_update := true;
6523: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6524: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDT_unique.information1 ;
6520: --
6521: if l_process_date between r_EDT_unique.information2 and r_EDT_unique.information3 then
6522: l_update := true;
6523: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6524: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDT_unique.information1 ;
6528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6521: if l_process_date between r_EDT_unique.information2 and r_EDT_unique.information3 then
6522: l_update := true;
6523: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6524: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDT_unique.information1 ;
6528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6522: l_update := true;
6523: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6524: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDT_unique.information1 ;
6528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6530: --
6523: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6524: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDT_unique.information1 ;
6528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6530: --
6531: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6524: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDT_unique.information1 ;
6528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6530: --
6531: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6532: --
6525: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6526: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDT_unique.information1 ;
6528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6530: --
6531: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6532: --
6533: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6527: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDT_unique.information1 ;
6528: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6530: --
6531: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6532: --
6533: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6534: --
6535: -- log_data('EDT',l_new_value,l_prefix || r_EDT_unique.name|| l_suffix,'REUSED');
6529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6530: --
6531: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6532: --
6533: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6534: --
6535: -- log_data('EDT',l_new_value,l_prefix || r_EDT_unique.name|| l_suffix,'REUSED');
6536: --
6537: end if ;
6550: open c_EDT_min_max_dates(r_EDT_unique.table_route_id, r_EDT_unique.information1 ) ;
6551: fetch c_EDT_min_max_dates into l_min_esd,l_max_eed ;
6552: --
6553:
6554: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6555: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6556: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6557: end if;
6558: l_min_esd := greatest(l_min_esd,r_EDT_unique.information2);
6551: fetch c_EDT_min_max_dates into l_min_esd,l_max_eed ;
6552: --
6553:
6554: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6555: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6556: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6557: end if;
6558: l_min_esd := greatest(l_min_esd,r_EDT_unique.information2);
6559: /**********************moved up from here **********************
6552: --
6553:
6554: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6555: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6556: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6557: end if;
6558: l_min_esd := greatest(l_min_esd,r_EDT_unique.information2);
6559: /**********************moved up from here **********************
6560: open c_EDT(r_EDT_unique.table_route_id,
6590: p_from_date => l_min_esd,
6591: p_to_date => l_max_eed );
6592: if l_dt_rec_found THEN
6593: --END TEMPIK
6594: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6591: p_to_date => l_max_eed );
6592: if l_dt_rec_found THEN
6593: --END TEMPIK
6594: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6592: if l_dt_rec_found THEN
6593: --END TEMPIK
6594: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6593: --END TEMPIK
6594: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6601: --
6594: if r_EDT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
6595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6601: --
6602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' then
6596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6601: --
6602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6603: --
6596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT_unique.information1 ;
6598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6601: --
6602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6603: --
6604: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6601: --
6602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6603: --
6604: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6605: end if ;
6606: --
6600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6601: --
6602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6603: --
6604: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6605: end if ;
6606: --
6607: l_object_found_in_target := true ;
6608: --TEMPIK
6636: end if ;
6637: --
6638:
6639: l_effective_date := r_EDT.information2;
6640: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6641: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6642: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6643: end if;
6644:
6637: --
6638:
6639: l_effective_date := r_EDT.information2;
6640: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6641: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6642: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6643: end if;
6644:
6645: if l_first_rec and not l_update then
6638:
6639: l_effective_date := r_EDT.information2;
6640: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6641: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6642: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6643: end if;
6644:
6645: if l_first_rec and not l_update then
6646: -- Call Create routine.
6701: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
6702: -- Update all relevent cer records with new pk_id
6703: hr_utility.set_location('Before plsql table ',222);
6704: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_ptip_id,222);
6705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT.information1 ;
6707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PTIP_ID ;
6708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6702: -- Update all relevent cer records with new pk_id
6703: hr_utility.set_location('Before plsql table ',222);
6704: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_ptip_id,222);
6705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT.information1 ;
6707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PTIP_ID ;
6708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6710: hr_utility.set_location('After plsql table ',222);
6703: hr_utility.set_location('Before plsql table ',222);
6704: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_ptip_id,222);
6705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT.information1 ;
6707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PTIP_ID ;
6708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6710: hr_utility.set_location('After plsql table ',222);
6711: --
6704: hr_utility.set_location('new_value id '||l_elig_dpnt_cvrd_othr_ptip_id,222);
6705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT.information1 ;
6707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PTIP_ID ;
6708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6710: hr_utility.set_location('After plsql table ',222);
6711: --
6712: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_CVRD_OTHR_PTIP_ID' ;
6706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDT.information1 ;
6707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_CVRD_OTHR_PTIP_ID ;
6708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6710: hr_utility.set_location('After plsql table ',222);
6711: --
6712: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6713: --
6708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDT_unique.table_route_id;
6710: hr_utility.set_location('After plsql table ',222);
6711: --
6712: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6713: --
6714: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6715: --
6716: else
6710: hr_utility.set_location('After plsql table ',222);
6711: --
6712: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6713: --
6714: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6715: --
6716: else
6717: --
6718: -- Call Update routine for the pk_id created in prev run .
6831: end loop;
6832: --
6833: exception when others then
6834: --
6835: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EDT',r_EDT.information5 ) ;
6836: --
6837: end create_EDT_rows;
6838:
6839: --
6976: end if ;
6977: -- End Prefix Sufix derivation
6978: for r_ERL_unique in c_unique_ERL('ERL') loop
6979:
6980: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6981: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6982: r_ERL_unique.information3 >=
6983: ben_pd_copy_to_ben_one.g_copy_effective_date)
6984: ) then
6977: -- End Prefix Sufix derivation
6978: for r_ERL_unique in c_unique_ERL('ERL') loop
6979:
6980: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6981: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6982: r_ERL_unique.information3 >=
6983: ben_pd_copy_to_ben_one.g_copy_effective_date)
6984: ) then
6985: --
6979:
6980: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6981: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6982: r_ERL_unique.information3 >=
6983: ben_pd_copy_to_ben_one.g_copy_effective_date)
6984: ) then
6985: --
6986: hr_utility.set_location(' r_ERL_unique.table_route_id '||r_ERL_unique.table_route_id,10);
6987: hr_utility.set_location(' r_ERL_unique.information1 '||r_ERL_unique.information1,10);
7018: l_object_found_in_target := TRUE;
7019: --
7020: if l_process_date between r_ERL_unique.information2 and r_ERL_unique.information3 then
7021: l_update := true;
7022: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7023: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERL_unique.information1 ;
7019: --
7020: if l_process_date between r_ERL_unique.information2 and r_ERL_unique.information3 then
7021: l_update := true;
7022: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7023: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERL_unique.information1 ;
7027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7020: if l_process_date between r_ERL_unique.information2 and r_ERL_unique.information3 then
7021: l_update := true;
7022: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7023: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERL_unique.information1 ;
7027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7021: l_update := true;
7022: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7023: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERL_unique.information1 ;
7027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7029: --
7022: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7023: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERL_unique.information1 ;
7027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7029: --
7030: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7023: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERL_unique.information1 ;
7027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7029: --
7030: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7031: --
7024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERL_unique.information1 ;
7027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7029: --
7030: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7031: --
7032: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERL_unique.information1 ;
7027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7029: --
7030: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7031: --
7032: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7033: --
7034: -- log_data('ERL',l_new_value,l_prefix || r_ERL_unique.name|| l_suffix,'REUSED');
7028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7029: --
7030: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7031: --
7032: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7033: --
7034: -- log_data('ERL',l_new_value,l_prefix || r_ERL_unique.name|| l_suffix,'REUSED');
7035: --
7036: end if ;
7049: open c_ERL_min_max_dates(r_ERL_unique.table_route_id, r_ERL_unique.information1 ) ;
7050: fetch c_ERL_min_max_dates into l_min_esd,l_max_eed ;
7051: --
7052:
7053: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7054: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7055: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7056: end if;
7057: l_min_esd := greatest(l_min_esd,r_ERL_unique.information2);
7050: fetch c_ERL_min_max_dates into l_min_esd,l_max_eed ;
7051: --
7052:
7053: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7054: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7055: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7056: end if;
7057: l_min_esd := greatest(l_min_esd,r_ERL_unique.information2);
7058: /**********************moved up from here **********************
7051: --
7052:
7053: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7054: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7055: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7056: end if;
7057: l_min_esd := greatest(l_min_esd,r_ERL_unique.information2);
7058: /**********************moved up from here **********************
7059: open c_ERL(r_ERL_unique.table_route_id,
7087: p_from_date => l_min_esd,
7088: p_to_date => l_max_eed );
7089: if l_dt_rec_found THEN
7090: --END TEMPIK
7091: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7088: p_to_date => l_max_eed );
7089: if l_dt_rec_found THEN
7090: --END TEMPIK
7091: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7089: if l_dt_rec_found THEN
7090: --END TEMPIK
7091: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7090: --END TEMPIK
7091: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7098: --
7091: if r_ERL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7098: --
7099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIGY_PRFL_RL_ID' then
7093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7098: --
7099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7100: --
7093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL_unique.information1 ;
7095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7098: --
7099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7100: --
7101: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7098: --
7099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7100: --
7101: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7102: end if ;
7103: --
7097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7098: --
7099: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7100: --
7101: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7102: end if ;
7103: --
7104: l_object_found_in_target := true ;
7105: --TEMPIK
7133: end if ;
7134: --
7135:
7136: l_effective_date := r_ERL.information2;
7137: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7138: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7139: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7140: end if;
7141:
7134: --
7135:
7136: l_effective_date := r_ERL.information2;
7137: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7138: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7139: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7140: end if;
7141:
7142: if l_first_rec and not l_update then
7135:
7136: l_effective_date := r_ERL.information2;
7137: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7138: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7139: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7140: end if;
7141:
7142: if l_first_rec and not l_update then
7143: -- Call Create routine.
7200: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
7201: -- Update all relevent cer records with new pk_id
7202: hr_utility.set_location('Before plsql table ',222);
7203: hr_utility.set_location('new_value id '||l_eligy_prfl_rl_id,222);
7204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL.information1 ;
7206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIGY_PRFL_RL_ID ;
7207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7201: -- Update all relevent cer records with new pk_id
7202: hr_utility.set_location('Before plsql table ',222);
7203: hr_utility.set_location('new_value id '||l_eligy_prfl_rl_id,222);
7204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL.information1 ;
7206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIGY_PRFL_RL_ID ;
7207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7209: hr_utility.set_location('After plsql table ',222);
7202: hr_utility.set_location('Before plsql table ',222);
7203: hr_utility.set_location('new_value id '||l_eligy_prfl_rl_id,222);
7204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL.information1 ;
7206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIGY_PRFL_RL_ID ;
7207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7209: hr_utility.set_location('After plsql table ',222);
7210: --
7203: hr_utility.set_location('new_value id '||l_eligy_prfl_rl_id,222);
7204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL.information1 ;
7206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIGY_PRFL_RL_ID ;
7207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7209: hr_utility.set_location('After plsql table ',222);
7210: --
7211: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIGY_PRFL_RL_ID' ;
7205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERL.information1 ;
7206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIGY_PRFL_RL_ID ;
7207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7209: hr_utility.set_location('After plsql table ',222);
7210: --
7211: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7212: --
7207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERL_unique.table_route_id;
7209: hr_utility.set_location('After plsql table ',222);
7210: --
7211: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7212: --
7213: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7214: --
7215: else
7209: hr_utility.set_location('After plsql table ',222);
7210: --
7211: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7212: --
7213: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7214: --
7215: else
7216: --
7217: -- Call Update routine for the pk_id created in prev run .
7331: end loop;
7332: --
7333: exception when others then
7334: --
7335: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ERL',r_ERL.information5 ) ;
7336: --
7337: end create_ERL_rows;
7338:
7339: --
7473: end if ;
7474: -- End Prefix Sufix derivation
7475: for r_EHW_unique in c_unique_EHW('EHW') loop
7476:
7477: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7478: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7479: r_EHW_unique.information3 >=
7480: ben_pd_copy_to_ben_one.g_copy_effective_date)
7481: ) then
7474: -- End Prefix Sufix derivation
7475: for r_EHW_unique in c_unique_EHW('EHW') loop
7476:
7477: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7478: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7479: r_EHW_unique.information3 >=
7480: ben_pd_copy_to_ben_one.g_copy_effective_date)
7481: ) then
7482: --
7476:
7477: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7478: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7479: r_EHW_unique.information3 >=
7480: ben_pd_copy_to_ben_one.g_copy_effective_date)
7481: ) then
7482: --
7483: hr_utility.set_location(' r_EHW_unique.table_route_id '||r_EHW_unique.table_route_id,10);
7484: hr_utility.set_location(' r_EHW_unique.information1 '||r_EHW_unique.information1,10);
7514: l_object_found_in_target := TRUE;
7515: --
7516: if l_process_date between r_EHW_unique.information2 and r_EHW_unique.information3 then
7517: l_update := true;
7518: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7519: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHW_unique.information1 ;
7515: --
7516: if l_process_date between r_EHW_unique.information2 and r_EHW_unique.information3 then
7517: l_update := true;
7518: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7519: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHW_unique.information1 ;
7523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7516: if l_process_date between r_EHW_unique.information2 and r_EHW_unique.information3 then
7517: l_update := true;
7518: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7519: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHW_unique.information1 ;
7523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7524: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7517: l_update := true;
7518: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7519: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHW_unique.information1 ;
7523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7524: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7525: --
7518: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7519: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHW_unique.information1 ;
7523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7524: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7525: --
7526: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7519: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHW_unique.information1 ;
7523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7524: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7525: --
7526: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7527: --
7520: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7521: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHW_unique.information1 ;
7523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7524: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7525: --
7526: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7527: --
7528: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7522: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHW_unique.information1 ;
7523: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7524: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7525: --
7526: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7527: --
7528: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7529: --
7530: -- log_data('EHW',l_new_value,l_prefix || r_EHW_unique.name|| l_suffix,'REUSED');
7524: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7525: --
7526: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7527: --
7528: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7529: --
7530: -- log_data('EHW',l_new_value,l_prefix || r_EHW_unique.name|| l_suffix,'REUSED');
7531: --
7532: end if ;
7545: open c_EHW_min_max_dates(r_EHW_unique.table_route_id, r_EHW_unique.information1 ) ;
7546: fetch c_EHW_min_max_dates into l_min_esd,l_max_eed ;
7547: --
7548:
7549: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7550: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7551: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7552: end if;
7553: l_min_esd := greatest(l_min_esd,r_EHW_unique.information2);
7546: fetch c_EHW_min_max_dates into l_min_esd,l_max_eed ;
7547: --
7548:
7549: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7550: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7551: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7552: end if;
7553: l_min_esd := greatest(l_min_esd,r_EHW_unique.information2);
7554: /**********************moved up from here **********************
7547: --
7548:
7549: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7550: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7551: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7552: end if;
7553: l_min_esd := greatest(l_min_esd,r_EHW_unique.information2);
7554: /**********************moved up from here **********************
7555: open c_EHW(r_EHW_unique.table_route_id,
7582: p_from_date => l_min_esd,
7583: p_to_date => l_max_eed );
7584: if l_dt_rec_found THEN
7585: --END TEMPIK
7586: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7587: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7583: p_to_date => l_max_eed );
7584: if l_dt_rec_found THEN
7585: --END TEMPIK
7586: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7587: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7584: if l_dt_rec_found THEN
7585: --END TEMPIK
7586: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7587: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7585: --END TEMPIK
7586: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7587: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7593: --
7586: if r_EHW_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
7587: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7593: --
7594: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7587: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRS_WKD_PRTE_ID' then
7588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7593: --
7594: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7595: --
7588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW_unique.information1 ;
7590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7593: --
7594: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7595: --
7596: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7590: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7591: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7593: --
7594: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7595: --
7596: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7597: end if ;
7598: --
7592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7593: --
7594: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7595: --
7596: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7597: end if ;
7598: --
7599: l_object_found_in_target := true ;
7600: --TEMPIK
7628: end if ;
7629: --
7630:
7631: l_effective_date := r_EHW.information2;
7632: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7633: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7634: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7635: end if;
7636:
7629: --
7630:
7631: l_effective_date := r_EHW.information2;
7632: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7633: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7634: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7635: end if;
7636:
7637: if l_first_rec and not l_update then
7630:
7631: l_effective_date := r_EHW.information2;
7632: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7633: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7634: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7635: end if;
7636:
7637: if l_first_rec and not l_update then
7638: -- Call Create routine.
7693: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
7694: -- Update all relevent cer records with new pk_id
7695: hr_utility.set_location('Before plsql table ',222);
7696: hr_utility.set_location('new_value id '||l_elig_hrs_wkd_prte_id,222);
7697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW.information1 ;
7699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRS_WKD_PRTE_ID ;
7700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7694: -- Update all relevent cer records with new pk_id
7695: hr_utility.set_location('Before plsql table ',222);
7696: hr_utility.set_location('new_value id '||l_elig_hrs_wkd_prte_id,222);
7697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW.information1 ;
7699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRS_WKD_PRTE_ID ;
7700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7702: hr_utility.set_location('After plsql table ',222);
7695: hr_utility.set_location('Before plsql table ',222);
7696: hr_utility.set_location('new_value id '||l_elig_hrs_wkd_prte_id,222);
7697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW.information1 ;
7699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRS_WKD_PRTE_ID ;
7700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7702: hr_utility.set_location('After plsql table ',222);
7703: --
7696: hr_utility.set_location('new_value id '||l_elig_hrs_wkd_prte_id,222);
7697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW.information1 ;
7699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRS_WKD_PRTE_ID ;
7700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7702: hr_utility.set_location('After plsql table ',222);
7703: --
7704: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRS_WKD_PRTE_ID' ;
7698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHW.information1 ;
7699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRS_WKD_PRTE_ID ;
7700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7702: hr_utility.set_location('After plsql table ',222);
7703: --
7704: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7705: --
7700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHW_unique.table_route_id;
7702: hr_utility.set_location('After plsql table ',222);
7703: --
7704: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7705: --
7706: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7707: --
7708: else
7702: hr_utility.set_location('After plsql table ',222);
7703: --
7704: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7705: --
7706: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7707: --
7708: else
7709: --
7710: -- Call Update routine for the pk_id created in prev run .
7823: end loop;
7824: --
7825: exception when others then
7826: --
7827: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EHW',r_EHW.information5 ) ;
7828: --
7829: end create_EHW_rows;
7830:
7831:
7970: end if ;
7971: -- End Prefix Sufix derivation
7972: for r_EJP_unique in c_unique_EJP('EJP') loop
7973:
7974: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7975: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7976: r_EJP_unique.information3 >=
7977: ben_pd_copy_to_ben_one.g_copy_effective_date)
7978: ) then
7971: -- End Prefix Sufix derivation
7972: for r_EJP_unique in c_unique_EJP('EJP') loop
7973:
7974: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7975: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7976: r_EJP_unique.information3 >=
7977: ben_pd_copy_to_ben_one.g_copy_effective_date)
7978: ) then
7979: --
7973:
7974: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7975: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7976: r_EJP_unique.information3 >=
7977: ben_pd_copy_to_ben_one.g_copy_effective_date)
7978: ) then
7979: --
7980: hr_utility.set_location(' r_EJP_unique.table_route_id '||r_EJP_unique.table_route_id,10);
7981: hr_utility.set_location(' r_EJP_unique.information1 '||r_EJP_unique.information1,10);
8000: --
8001: close c_EJP ;
8002: --
8003: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EJP.INFORMATION263,l_dml_operation);
8004: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
8005: l_JOB_ID := r_EJP.information176;
8006: else
8007: l_JOB_ID := r_EJP.information174;
8008: end if;
8017: l_object_found_in_target := TRUE;
8018: --
8019: if l_process_date between r_EJP_unique.information2 and r_EJP_unique.information3 then
8020: l_update := true;
8021: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8022: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EJP_unique.information1 ;
8018: --
8019: if l_process_date between r_EJP_unique.information2 and r_EJP_unique.information3 then
8020: l_update := true;
8021: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8022: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EJP_unique.information1 ;
8026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8019: if l_process_date between r_EJP_unique.information2 and r_EJP_unique.information3 then
8020: l_update := true;
8021: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8022: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EJP_unique.information1 ;
8026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8020: l_update := true;
8021: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8022: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EJP_unique.information1 ;
8026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8028: --
8021: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8022: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EJP_unique.information1 ;
8026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8028: --
8029: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8022: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EJP_unique.information1 ;
8026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8028: --
8029: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8030: --
8023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EJP_unique.information1 ;
8026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8028: --
8029: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8030: --
8031: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EJP_unique.information1 ;
8026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8028: --
8029: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8030: --
8031: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8032: --
8033: -- log_data('EJP',l_new_value,l_prefix || r_EJP_unique.name|| l_suffix,'REUSED');
8027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8028: --
8029: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8030: --
8031: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8032: --
8033: -- log_data('EJP',l_new_value,l_prefix || r_EJP_unique.name|| l_suffix,'REUSED');
8034: --
8035: end if ;
8048: open c_EJP_min_max_dates(r_EJP_unique.table_route_id, r_EJP_unique.information1 ) ;
8049: fetch c_EJP_min_max_dates into l_min_esd,l_max_eed ;
8050: --
8051:
8052: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8053: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8054: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8055: end if;
8056: l_min_esd := greatest(l_min_esd,r_EJP_unique.information2);
8049: fetch c_EJP_min_max_dates into l_min_esd,l_max_eed ;
8050: --
8051:
8052: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8053: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8054: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8055: end if;
8056: l_min_esd := greatest(l_min_esd,r_EJP_unique.information2);
8057: /**********************moved up from here **********************
8050: --
8051:
8052: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8053: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8054: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8055: end if;
8056: l_min_esd := greatest(l_min_esd,r_EJP_unique.information2);
8057: /**********************moved up from here **********************
8058: open c_EJP(r_EJP_unique.table_route_id,
8096: p_from_date => l_min_esd,
8097: p_to_date => l_max_eed );
8098: if l_dt_rec_found THEN
8099: --END TEMPIK
8100: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8101: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8103: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8104: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8097: p_to_date => l_max_eed );
8098: if l_dt_rec_found THEN
8099: --END TEMPIK
8100: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8101: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8103: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8104: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8098: if l_dt_rec_found THEN
8099: --END TEMPIK
8100: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8101: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8103: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8104: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8099: --END TEMPIK
8100: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8101: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8103: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8104: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8107: --
8100: if r_EJP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8101: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8103: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8104: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8107: --
8108: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8101: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_JOB_PRTE_ID' then
8102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8103: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8104: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8107: --
8108: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8109: --
8102: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8103: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP_unique.information1 ;
8104: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8107: --
8108: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8109: --
8110: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8104: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8107: --
8108: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8109: --
8110: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8111: end if ;
8112: --
8106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8107: --
8108: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8109: --
8110: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8111: end if ;
8112: --
8113: l_object_found_in_target := true ;
8114: --TEMPIK
8144: end if ;
8145: --
8146:
8147: l_effective_date := r_EJP.information2;
8148: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8149: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8150: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8151: end if;
8152:
8145: --
8146:
8147: l_effective_date := r_EJP.information2;
8148: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8149: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8150: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8151: end if;
8152:
8153: if l_first_rec and not l_update then
8146:
8147: l_effective_date := r_EJP.information2;
8148: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8149: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8150: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8151: end if;
8152:
8153: if l_first_rec and not l_update then
8154: -- Call Create routine.
8209: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
8210: -- Update all relevent cer records with new pk_id
8211: hr_utility.set_location('Before plsql table ',222);
8212: hr_utility.set_location('new_value id '||l_elig_job_prte_id,222);
8213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP.information1 ;
8215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_JOB_PRTE_ID ;
8216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8210: -- Update all relevent cer records with new pk_id
8211: hr_utility.set_location('Before plsql table ',222);
8212: hr_utility.set_location('new_value id '||l_elig_job_prte_id,222);
8213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP.information1 ;
8215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_JOB_PRTE_ID ;
8216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8218: hr_utility.set_location('After plsql table ',222);
8211: hr_utility.set_location('Before plsql table ',222);
8212: hr_utility.set_location('new_value id '||l_elig_job_prte_id,222);
8213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP.information1 ;
8215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_JOB_PRTE_ID ;
8216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8218: hr_utility.set_location('After plsql table ',222);
8219: --
8212: hr_utility.set_location('new_value id '||l_elig_job_prte_id,222);
8213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP.information1 ;
8215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_JOB_PRTE_ID ;
8216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8218: hr_utility.set_location('After plsql table ',222);
8219: --
8220: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_JOB_PRTE_ID' ;
8214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EJP.information1 ;
8215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_JOB_PRTE_ID ;
8216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8218: hr_utility.set_location('After plsql table ',222);
8219: --
8220: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8221: --
8216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EJP_unique.table_route_id;
8218: hr_utility.set_location('After plsql table ',222);
8219: --
8220: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8221: --
8222: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8223: --
8224: else
8218: hr_utility.set_location('After plsql table ',222);
8219: --
8220: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8221: --
8222: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8223: --
8224: else
8225: --
8226: -- Call Update routine for the pk_id created in prev run .
8341: end loop;
8342: --
8343: exception when others then
8344: --
8345: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EJP',r_EJP.information5 ) ;
8346: --
8347: end create_EJP_rows;
8348:
8349:
8484: end if ;
8485: -- End Prefix Sufix derivation
8486: for r_ELU_unique in c_unique_ELU('ELU') loop
8487:
8488: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8489: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8490: r_ELU_unique.information3 >=
8491: ben_pd_copy_to_ben_one.g_copy_effective_date)
8492: ) then
8485: -- End Prefix Sufix derivation
8486: for r_ELU_unique in c_unique_ELU('ELU') loop
8487:
8488: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8489: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8490: r_ELU_unique.information3 >=
8491: ben_pd_copy_to_ben_one.g_copy_effective_date)
8492: ) then
8493: --
8487:
8488: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8489: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8490: r_ELU_unique.information3 >=
8491: ben_pd_copy_to_ben_one.g_copy_effective_date)
8492: ) then
8493: --
8494: hr_utility.set_location(' r_ELU_unique.table_route_id '||r_ELU_unique.table_route_id,10);
8495: hr_utility.set_location(' r_ELU_unique.information1 '||r_ELU_unique.information1,10);
8523: l_object_found_in_target := TRUE;
8524: --
8525: if l_process_date between r_ELU_unique.information2 and r_ELU_unique.information3 then
8526: l_update := true;
8527: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8528: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELU_unique.information1 ;
8524: --
8525: if l_process_date between r_ELU_unique.information2 and r_ELU_unique.information3 then
8526: l_update := true;
8527: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8528: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELU_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8525: if l_process_date between r_ELU_unique.information2 and r_ELU_unique.information3 then
8526: l_update := true;
8527: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8528: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELU_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8526: l_update := true;
8527: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8528: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELU_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8534: --
8527: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8528: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELU_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8534: --
8535: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8528: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELU_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8534: --
8535: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8536: --
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELU_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8534: --
8535: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8536: --
8537: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELU_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8534: --
8535: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8536: --
8537: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8538: --
8539: -- log_data('ELU',l_new_value,l_prefix || r_ELU_unique.name|| l_suffix,'REUSED');
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8534: --
8535: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8536: --
8537: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8538: --
8539: -- log_data('ELU',l_new_value,l_prefix || r_ELU_unique.name|| l_suffix,'REUSED');
8540: --
8541: end if ;
8554: open c_ELU_min_max_dates(r_ELU_unique.table_route_id, r_ELU_unique.information1 ) ;
8555: fetch c_ELU_min_max_dates into l_min_esd,l_max_eed ;
8556: --
8557:
8558: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8559: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8560: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8561: end if;
8562: l_min_esd := greatest(l_min_esd,r_ELU_unique.information2);
8555: fetch c_ELU_min_max_dates into l_min_esd,l_max_eed ;
8556: --
8557:
8558: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8559: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8560: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8561: end if;
8562: l_min_esd := greatest(l_min_esd,r_ELU_unique.information2);
8563: /**********************moved up from here **********************
8556: --
8557:
8558: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8559: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8560: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8561: end if;
8562: l_min_esd := greatest(l_min_esd,r_ELU_unique.information2);
8563: /**********************moved up from here **********************
8564: open c_ELU(r_ELU_unique.table_route_id,
8590: p_from_date => l_min_esd,
8591: p_to_date => l_max_eed );
8592: if l_dt_rec_found THEN
8593: --END TEMPIK
8594: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8591: p_to_date => l_max_eed );
8592: if l_dt_rec_found THEN
8593: --END TEMPIK
8594: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8592: if l_dt_rec_found THEN
8593: --END TEMPIK
8594: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8593: --END TEMPIK
8594: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8601: --
8594: if r_ELU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
8595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8601: --
8602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8595: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LBR_MMBR_PRTE_ID' then
8596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8601: --
8602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8603: --
8596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU_unique.information1 ;
8598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8601: --
8602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8603: --
8604: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8601: --
8602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8603: --
8604: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8605: end if ;
8606: --
8600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8601: --
8602: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8603: --
8604: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8605: end if ;
8606: --
8607: l_object_found_in_target := true ;
8608: --TEMPIK
8636: end if ;
8637: --
8638:
8639: l_effective_date := r_ELU.information2;
8640: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8641: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8642: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8643: end if;
8644:
8637: --
8638:
8639: l_effective_date := r_ELU.information2;
8640: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8641: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8642: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8643: end if;
8644:
8645: if l_first_rec and not l_update then
8638:
8639: l_effective_date := r_ELU.information2;
8640: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8641: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8642: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8643: end if;
8644:
8645: if l_first_rec and not l_update then
8646: -- Call Create routine.
8701: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
8702: -- Update all relevent cer records with new pk_id
8703: hr_utility.set_location('Before plsql table ',222);
8704: hr_utility.set_location('new_value id '||l_elig_lbr_mmbr_prte_id,222);
8705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU.information1 ;
8707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LBR_MMBR_PRTE_ID ;
8708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8702: -- Update all relevent cer records with new pk_id
8703: hr_utility.set_location('Before plsql table ',222);
8704: hr_utility.set_location('new_value id '||l_elig_lbr_mmbr_prte_id,222);
8705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU.information1 ;
8707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LBR_MMBR_PRTE_ID ;
8708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8710: hr_utility.set_location('After plsql table ',222);
8703: hr_utility.set_location('Before plsql table ',222);
8704: hr_utility.set_location('new_value id '||l_elig_lbr_mmbr_prte_id,222);
8705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU.information1 ;
8707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LBR_MMBR_PRTE_ID ;
8708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8710: hr_utility.set_location('After plsql table ',222);
8711: --
8704: hr_utility.set_location('new_value id '||l_elig_lbr_mmbr_prte_id,222);
8705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU.information1 ;
8707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LBR_MMBR_PRTE_ID ;
8708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8710: hr_utility.set_location('After plsql table ',222);
8711: --
8712: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LBR_MMBR_PRTE_ID' ;
8706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELU.information1 ;
8707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LBR_MMBR_PRTE_ID ;
8708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8710: hr_utility.set_location('After plsql table ',222);
8711: --
8712: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8713: --
8708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELU_unique.table_route_id;
8710: hr_utility.set_location('After plsql table ',222);
8711: --
8712: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8713: --
8714: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8715: --
8716: else
8710: hr_utility.set_location('After plsql table ',222);
8711: --
8712: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8713: --
8714: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8715: --
8716: else
8717: --
8718: -- Call Update routine for the pk_id created in prev run .
8831: end loop;
8832: --
8833: exception when others then
8834: --
8835: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ELU',r_ELU.information5 ) ;
8836: --
8837: end create_ELU_rows;
8838:
8839:
8973: end if ;
8974: -- End Prefix Sufix derivation
8975: for r_ELN_unique in c_unique_ELN('ELN') loop
8976:
8977: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8978: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8979: r_ELN_unique.information3 >=
8980: ben_pd_copy_to_ben_one.g_copy_effective_date)
8981: ) then
8974: -- End Prefix Sufix derivation
8975: for r_ELN_unique in c_unique_ELN('ELN') loop
8976:
8977: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8978: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8979: r_ELN_unique.information3 >=
8980: ben_pd_copy_to_ben_one.g_copy_effective_date)
8981: ) then
8982: --
8976:
8977: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8978: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8979: r_ELN_unique.information3 >=
8980: ben_pd_copy_to_ben_one.g_copy_effective_date)
8981: ) then
8982: --
8983: hr_utility.set_location(' r_ELN_unique.table_route_id '||r_ELN_unique.table_route_id,10);
8984: hr_utility.set_location(' r_ELN_unique.information1 '||r_ELN_unique.information1,10);
9005: close c_ELN ;
9006: --
9007: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_ELN.INFORMATION263,l_dml_operation);-- changed from information11
9008:
9009: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
9010: l_ORGANIZATION_ID := r_ELN.information176;
9011: else
9012: l_ORGANIZATION_ID := r_ELN.information174;
9013: end if;
9019: l_object_found_in_target := TRUE;
9020: --
9021: if l_process_date between r_ELN_unique.information2 and r_ELN_unique.information3 then
9022: l_update := true;
9023: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELN_unique.information1 ;
9020: --
9021: if l_process_date between r_ELN_unique.information2 and r_ELN_unique.information3 then
9022: l_update := true;
9023: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELN_unique.information1 ;
9028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9021: if l_process_date between r_ELN_unique.information2 and r_ELN_unique.information3 then
9022: l_update := true;
9023: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELN_unique.information1 ;
9028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9022: l_update := true;
9023: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELN_unique.information1 ;
9028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9030: --
9023: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELN_unique.information1 ;
9028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9030: --
9031: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELN_unique.information1 ;
9028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9030: --
9031: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9032: --
9025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELN_unique.information1 ;
9028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9030: --
9031: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9032: --
9033: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELN_unique.information1 ;
9028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9030: --
9031: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9032: --
9033: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9034: --
9035: -- log_data('ELN',l_new_value,l_prefix || r_ELN_unique.name|| l_suffix,'REUSED');
9029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9030: --
9031: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9032: --
9033: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9034: --
9035: -- log_data('ELN',l_new_value,l_prefix || r_ELN_unique.name|| l_suffix,'REUSED');
9036: --
9037: end if ;
9050: open c_ELN_min_max_dates(r_ELN_unique.table_route_id, r_ELN_unique.information1 ) ;
9051: fetch c_ELN_min_max_dates into l_min_esd,l_max_eed ;
9052: --
9053:
9054: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9055: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9056: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9057: end if;
9058: l_min_esd := greatest(l_min_esd,r_ELN_unique.information2);
9051: fetch c_ELN_min_max_dates into l_min_esd,l_max_eed ;
9052: --
9053:
9054: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9055: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9056: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9057: end if;
9058: l_min_esd := greatest(l_min_esd,r_ELN_unique.information2);
9059: /**********************moved up from here **********************
9052: --
9053:
9054: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9055: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9056: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9057: end if;
9058: l_min_esd := greatest(l_min_esd,r_ELN_unique.information2);
9059: /**********************moved up from here **********************
9060: open c_ELN(r_ELN_unique.table_route_id,
9066: --
9067: close c_ELN ;
9068: --
9069: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_ELN.INFORMATION263,l_dml_operation);-- changed from information11
9070: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
9071: l_ORGANIZATION_ID := r_ELN.information176;
9072: else
9073: l_ORGANIZATION_ID := r_ELN.information174;
9074: end if;
9102: p_from_date => l_min_esd,
9103: p_to_date => l_max_eed );
9104: if l_dt_rec_found THEN
9105: --END TEMPIK
9106: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9107: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9103: p_to_date => l_max_eed );
9104: if l_dt_rec_found THEN
9105: --END TEMPIK
9106: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9107: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9104: if l_dt_rec_found THEN
9105: --END TEMPIK
9106: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9107: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9105: --END TEMPIK
9106: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9107: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9113: --
9106: if r_ELN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9107: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9113: --
9114: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9107: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LGL_ENTY_PRTE_ID' then
9108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9113: --
9114: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9115: --
9108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN_unique.information1 ;
9110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9113: --
9114: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9115: --
9116: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9113: --
9114: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9115: --
9116: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9117: end if ;
9118: --
9112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9113: --
9114: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9115: --
9116: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9117: end if ;
9118: --
9119: l_object_found_in_target := true ;
9120: --TEMPIK
9150: end if ;
9151: --
9152:
9153: l_effective_date := r_ELN.information2;
9154: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9155: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9156: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9157: end if;
9158:
9151: --
9152:
9153: l_effective_date := r_ELN.information2;
9154: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9155: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9156: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9157: end if;
9158:
9159: if l_first_rec and not l_update then
9152:
9153: l_effective_date := r_ELN.information2;
9154: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9155: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9156: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9157: end if;
9158:
9159: if l_first_rec and not l_update then
9160: -- Call Create routine.
9215: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
9216: -- Update all relevent cer records with new pk_id
9217: hr_utility.set_location('Before plsql table ',222);
9218: hr_utility.set_location('new_value id '||l_elig_lgl_enty_prte_id,222);
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LGL_ENTY_PRTE_ID ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9216: -- Update all relevent cer records with new pk_id
9217: hr_utility.set_location('Before plsql table ',222);
9218: hr_utility.set_location('new_value id '||l_elig_lgl_enty_prte_id,222);
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LGL_ENTY_PRTE_ID ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9224: hr_utility.set_location('After plsql table ',222);
9217: hr_utility.set_location('Before plsql table ',222);
9218: hr_utility.set_location('new_value id '||l_elig_lgl_enty_prte_id,222);
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LGL_ENTY_PRTE_ID ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9224: hr_utility.set_location('After plsql table ',222);
9225: --
9218: hr_utility.set_location('new_value id '||l_elig_lgl_enty_prte_id,222);
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LGL_ENTY_PRTE_ID ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9224: hr_utility.set_location('After plsql table ',222);
9225: --
9226: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LGL_ENTY_PRTE_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELN.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LGL_ENTY_PRTE_ID ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9224: hr_utility.set_location('After plsql table ',222);
9225: --
9226: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9227: --
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELN_unique.table_route_id;
9224: hr_utility.set_location('After plsql table ',222);
9225: --
9226: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9227: --
9228: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9229: --
9230: else
9224: hr_utility.set_location('After plsql table ',222);
9225: --
9226: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9227: --
9228: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9229: --
9230: else
9231: --
9232: -- Call Update routine for the pk_id created in prev run .
9347: end loop;
9348: --
9349: exception when others then
9350: --
9351: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ELN',r_ELN.information5 ) ;
9352: --
9353: end create_ELN_rows;
9354:
9355:
9494: end if ;
9495: -- End Prefix Sufix derivation
9496: for r_ELR_unique in c_unique_ELR('ELR') loop
9497:
9498: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9499: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9500: r_ELR_unique.information3 >=
9501: ben_pd_copy_to_ben_one.g_copy_effective_date)
9502: ) then
9495: -- End Prefix Sufix derivation
9496: for r_ELR_unique in c_unique_ELR('ELR') loop
9497:
9498: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9499: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9500: r_ELR_unique.information3 >=
9501: ben_pd_copy_to_ben_one.g_copy_effective_date)
9502: ) then
9503: --
9497:
9498: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9499: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9500: r_ELR_unique.information3 >=
9501: ben_pd_copy_to_ben_one.g_copy_effective_date)
9502: ) then
9503: --
9504: hr_utility.set_location(' r_ELR_unique.table_route_id '||r_ELR_unique.table_route_id,10);
9505: hr_utility.set_location(' r_ELR_unique.information1 '||r_ELR_unique.information1,10);
9525: fetch c_ELR into r_ELR ;
9526: --
9527: close c_ELR ;
9528: --
9529: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
9530: l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information176;
9531: --l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information180; -- For bug 3570016
9532: else
9533: l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information174;
9533: l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information174;
9534: -- l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information178; -- For bug 3570016
9535: end if;
9536: --
9537: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
9538: l_ABS_ATTENDANCE_REASON_ID := r_ELR.information180;
9539: --l_ABS_ATTENDANCE_REASON_ID := r_ELR.information176; -- For bug 3570016
9540: else
9541: l_ABS_ATTENDANCE_REASON_ID := r_ELR.information178;
9554: l_object_found_in_target := TRUE;
9555: --
9556: if l_process_date between r_ELR_unique.information2 and r_ELR_unique.information3 then
9557: l_update := true;
9558: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9559: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9560: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9561: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9562: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELR_unique.information1 ;
9555: --
9556: if l_process_date between r_ELR_unique.information2 and r_ELR_unique.information3 then
9557: l_update := true;
9558: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9559: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9560: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9561: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9562: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELR_unique.information1 ;
9563: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9556: if l_process_date between r_ELR_unique.information2 and r_ELR_unique.information3 then
9557: l_update := true;
9558: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9559: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9560: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9561: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9562: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELR_unique.information1 ;
9563: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9557: l_update := true;
9558: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9559: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9560: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9561: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9562: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELR_unique.information1 ;
9563: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9565: --
9558: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9559: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9560: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9561: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9562: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELR_unique.information1 ;
9563: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9565: --
9566: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9559: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9560: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9561: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9562: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELR_unique.information1 ;
9563: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9565: --
9566: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9567: --
9560: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9561: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9562: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELR_unique.information1 ;
9563: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9565: --
9566: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9567: --
9568: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9562: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELR_unique.information1 ;
9563: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9565: --
9566: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9567: --
9568: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9569: --
9570: -- log_data('ELR',l_new_value,l_prefix || r_ELR_unique.name|| l_suffix,'REUSED');
9564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9565: --
9566: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9567: --
9568: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9569: --
9570: -- log_data('ELR',l_new_value,l_prefix || r_ELR_unique.name|| l_suffix,'REUSED');
9571: --
9572: end if ;
9585: open c_ELR_min_max_dates(r_ELR_unique.table_route_id, r_ELR_unique.information1 ) ;
9586: fetch c_ELR_min_max_dates into l_min_esd,l_max_eed ;
9587: --
9588:
9589: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9590: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9591: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9592: end if;
9593: l_min_esd := greatest(l_min_esd,r_ELR_unique.information2);
9586: fetch c_ELR_min_max_dates into l_min_esd,l_max_eed ;
9587: --
9588:
9589: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9590: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9591: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9592: end if;
9593: l_min_esd := greatest(l_min_esd,r_ELR_unique.information2);
9594: /**********************moved up from here **********************
9587: --
9588:
9589: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9590: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9591: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9592: end if;
9593: l_min_esd := greatest(l_min_esd,r_ELR_unique.information2);
9594: /**********************moved up from here **********************
9595: open c_ELR(r_ELR_unique.table_route_id,
9600: fetch c_ELR into r_ELR ;
9601: --
9602: close c_ELR ;
9603: --
9604: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
9605: l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information176;
9606: --l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information180; -- For bug 3570016
9607: else
9608: l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information174;
9608: l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information174;
9609: -- l_ABSENCE_ATTENDANCE_TYPE_ID := r_ELR.information178; -- For bug 3570016
9610: end if;
9611: --
9612: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
9613: l_ABS_ATTENDANCE_REASON_ID := r_ELR.information180;
9614: --l_ABS_ATTENDANCE_REASON_ID := r_ELR.information176; -- For bug 3570016
9615: else
9616: l_ABS_ATTENDANCE_REASON_ID := r_ELR.information178;
9651: p_from_date => l_min_esd,
9652: p_to_date => l_max_eed );
9653: if l_dt_rec_found THEN
9654: --END TEMPIK
9655: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9656: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9659: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9652: p_to_date => l_max_eed );
9653: if l_dt_rec_found THEN
9654: --END TEMPIK
9655: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9656: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9659: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9653: if l_dt_rec_found THEN
9654: --END TEMPIK
9655: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9656: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9659: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9654: --END TEMPIK
9655: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9656: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9659: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9662: --
9655: if r_ELR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
9656: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9659: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9662: --
9663: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9656: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOA_RSN_PRTE_ID' then
9657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9659: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9662: --
9663: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9664: --
9657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR_unique.information1 ;
9659: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9662: --
9663: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9664: --
9665: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9659: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9662: --
9663: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9664: --
9665: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9666: end if ;
9667: --
9661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9662: --
9663: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9664: --
9665: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9666: end if ;
9667: --
9668: l_object_found_in_target := true ;
9669: --TEMPIK
9700: end if ;
9701: --
9702:
9703: l_effective_date := r_ELR.information2;
9704: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9705: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9706: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9707: end if;
9708: if l_first_rec and not l_update then
9701: --
9702:
9703: l_effective_date := r_ELR.information2;
9704: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9705: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9706: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9707: end if;
9708: if l_first_rec and not l_update then
9709: -- Call Create routine.
9702:
9703: l_effective_date := r_ELR.information2;
9704: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9705: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9706: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9707: end if;
9708: if l_first_rec and not l_update then
9709: -- Call Create routine.
9710: hr_utility.set_location(' BEN_ELIG_LOA_RSN_PRTE_F CREATE_ELIG_LOA_RSN_PRTE ',20);
9765: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
9766: -- Update all relevent cer records with new pk_id
9767: hr_utility.set_location('Before plsql table ',222);
9768: hr_utility.set_location('new_value id '||l_elig_loa_rsn_prte_id,222);
9769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR.information1 ;
9771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOA_RSN_PRTE_ID ;
9772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9766: -- Update all relevent cer records with new pk_id
9767: hr_utility.set_location('Before plsql table ',222);
9768: hr_utility.set_location('new_value id '||l_elig_loa_rsn_prte_id,222);
9769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR.information1 ;
9771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOA_RSN_PRTE_ID ;
9772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9774: hr_utility.set_location('After plsql table ',222);
9767: hr_utility.set_location('Before plsql table ',222);
9768: hr_utility.set_location('new_value id '||l_elig_loa_rsn_prte_id,222);
9769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR.information1 ;
9771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOA_RSN_PRTE_ID ;
9772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9774: hr_utility.set_location('After plsql table ',222);
9775: --
9768: hr_utility.set_location('new_value id '||l_elig_loa_rsn_prte_id,222);
9769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR.information1 ;
9771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOA_RSN_PRTE_ID ;
9772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9774: hr_utility.set_location('After plsql table ',222);
9775: --
9776: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOA_RSN_PRTE_ID' ;
9770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELR.information1 ;
9771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOA_RSN_PRTE_ID ;
9772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9774: hr_utility.set_location('After plsql table ',222);
9775: --
9776: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9777: --
9772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELR_unique.table_route_id;
9774: hr_utility.set_location('After plsql table ',222);
9775: --
9776: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9777: --
9778: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9779: --
9780: else
9774: hr_utility.set_location('After plsql table ',222);
9775: --
9776: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9777: --
9778: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9779: --
9780: else
9781:
9782: --
9901: -- hr_utility.trace_off;
9902: exception when others then
9903: --
9904: -- hr_utility.trace_off;
9905: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ELR',r_ELR.information5 ) ;
9906: --
9907: end create_ELR_rows;
9908:
9909:
10044: end if ;
10045: -- End Prefix Sufix derivation
10046: for r_ELS_unique in c_unique_ELS('ELS') loop
10047:
10048: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10049: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10050: r_ELS_unique.information3 >=
10051: ben_pd_copy_to_ben_one.g_copy_effective_date)
10052: ) then
10045: -- End Prefix Sufix derivation
10046: for r_ELS_unique in c_unique_ELS('ELS') loop
10047:
10048: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10049: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10050: r_ELS_unique.information3 >=
10051: ben_pd_copy_to_ben_one.g_copy_effective_date)
10052: ) then
10053: --
10047:
10048: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10049: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10050: r_ELS_unique.information3 >=
10051: ben_pd_copy_to_ben_one.g_copy_effective_date)
10052: ) then
10053: --
10054: hr_utility.set_location(' r_ELS_unique.table_route_id '||r_ELS_unique.table_route_id,10);
10055: hr_utility.set_location(' r_ELS_unique.information1 '||r_ELS_unique.information1,10);
10085: l_object_found_in_target := TRUE;
10086: --
10087: if l_process_date between r_ELS_unique.information2 and r_ELS_unique.information3 then
10088: l_update := true;
10089: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10090: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELS_unique.information1 ;
10086: --
10087: if l_process_date between r_ELS_unique.information2 and r_ELS_unique.information3 then
10088: l_update := true;
10089: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10090: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELS_unique.information1 ;
10094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10087: if l_process_date between r_ELS_unique.information2 and r_ELS_unique.information3 then
10088: l_update := true;
10089: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10090: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELS_unique.information1 ;
10094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10088: l_update := true;
10089: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10090: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELS_unique.information1 ;
10094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10096: --
10089: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10090: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELS_unique.information1 ;
10094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10096: --
10097: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10090: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELS_unique.information1 ;
10094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10096: --
10097: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10098: --
10091: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10092: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELS_unique.information1 ;
10094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10096: --
10097: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10098: --
10099: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELS_unique.information1 ;
10094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10096: --
10097: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10098: --
10099: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10100: --
10101: -- log_data('ELS',l_new_value,l_prefix || r_ELS_unique.name|| l_suffix,'REUSED');
10095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10096: --
10097: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10098: --
10099: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10100: --
10101: -- log_data('ELS',l_new_value,l_prefix || r_ELS_unique.name|| l_suffix,'REUSED');
10102: --
10103: end if ;
10116: open c_ELS_min_max_dates(r_ELS_unique.table_route_id, r_ELS_unique.information1 ) ;
10117: fetch c_ELS_min_max_dates into l_min_esd,l_max_eed ;
10118: --
10119:
10120: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10121: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10122: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10123: end if;
10124: l_min_esd := greatest(l_min_esd,r_ELS_unique.information2);
10117: fetch c_ELS_min_max_dates into l_min_esd,l_max_eed ;
10118: --
10119:
10120: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10121: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10122: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10123: end if;
10124: l_min_esd := greatest(l_min_esd,r_ELS_unique.information2);
10125: /**********************moved up from here **********************
10118: --
10119:
10120: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10121: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10122: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10123: end if;
10124: l_min_esd := greatest(l_min_esd,r_ELS_unique.information2);
10125: /**********************moved up from here **********************
10126: open c_ELS(r_ELS_unique.table_route_id,
10153: p_from_date => l_min_esd,
10154: p_to_date => l_max_eed );
10155: if l_dt_rec_found THEN
10156: --END TEMPIK
10157: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10158: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10154: p_to_date => l_max_eed );
10155: if l_dt_rec_found THEN
10156: --END TEMPIK
10157: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10158: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10155: if l_dt_rec_found THEN
10156: --END TEMPIK
10157: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10158: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10156: --END TEMPIK
10157: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10158: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10164: --
10157: if r_ELS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10158: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10164: --
10165: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10158: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LOS_PRTE_ID' then
10159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10164: --
10165: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10166: --
10159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS_unique.information1 ;
10161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10164: --
10165: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10166: --
10167: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10164: --
10165: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10166: --
10167: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10168: end if ;
10169: --
10163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10164: --
10165: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10166: --
10167: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10168: end if ;
10169: --
10170: l_object_found_in_target := true ;
10171: --TEMPIK
10199: end if ;
10200: --
10201:
10202: l_effective_date := r_ELS.information2;
10203: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10204: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10205: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10206: end if;
10207:
10200: --
10201:
10202: l_effective_date := r_ELS.information2;
10203: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10204: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10205: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10206: end if;
10207:
10208: if l_first_rec and not l_update then
10201:
10202: l_effective_date := r_ELS.information2;
10203: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10204: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10205: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10206: end if;
10207:
10208: if l_first_rec and not l_update then
10209: -- Call Create routine.
10265: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
10266: -- Update all relevent cer records with new pk_id
10267: hr_utility.set_location('Before plsql table ',222);
10268: hr_utility.set_location('new_value id '||l_elig_los_prte_id,222);
10269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS.information1 ;
10271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOS_PRTE_ID ;
10272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10266: -- Update all relevent cer records with new pk_id
10267: hr_utility.set_location('Before plsql table ',222);
10268: hr_utility.set_location('new_value id '||l_elig_los_prte_id,222);
10269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS.information1 ;
10271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOS_PRTE_ID ;
10272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10274: hr_utility.set_location('After plsql table ',222);
10267: hr_utility.set_location('Before plsql table ',222);
10268: hr_utility.set_location('new_value id '||l_elig_los_prte_id,222);
10269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS.information1 ;
10271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOS_PRTE_ID ;
10272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10274: hr_utility.set_location('After plsql table ',222);
10275: --
10268: hr_utility.set_location('new_value id '||l_elig_los_prte_id,222);
10269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS.information1 ;
10271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOS_PRTE_ID ;
10272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10274: hr_utility.set_location('After plsql table ',222);
10275: --
10276: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LOS_PRTE_ID' ;
10270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELS.information1 ;
10271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LOS_PRTE_ID ;
10272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10274: hr_utility.set_location('After plsql table ',222);
10275: --
10276: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10277: --
10272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELS_unique.table_route_id;
10274: hr_utility.set_location('After plsql table ',222);
10275: --
10276: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10277: --
10278: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10279: --
10280: else
10274: hr_utility.set_location('After plsql table ',222);
10275: --
10276: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10277: --
10278: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10279: --
10280: else
10281: --
10282: -- Call Update routine for the pk_id created in prev run .
10395: end loop;
10396: --
10397: exception when others then
10398: --
10399: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ELS',r_ELS.information5 ) ;
10400: --
10401: end create_ELS_rows;
10402:
10403:
10538: end if ;
10539: -- End Prefix Sufix derivation
10540: for r_ELV_unique in c_unique_ELV('ELV') loop
10541:
10542: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10543: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10544: r_ELV_unique.information3 >=
10545: ben_pd_copy_to_ben_one.g_copy_effective_date)
10546: ) then
10539: -- End Prefix Sufix derivation
10540: for r_ELV_unique in c_unique_ELV('ELV') loop
10541:
10542: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10543: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10544: r_ELV_unique.information3 >=
10545: ben_pd_copy_to_ben_one.g_copy_effective_date)
10546: ) then
10547: --
10541:
10542: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10543: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10544: r_ELV_unique.information3 >=
10545: ben_pd_copy_to_ben_one.g_copy_effective_date)
10546: ) then
10547: --
10548: hr_utility.set_location(' r_ELV_unique.table_route_id '||r_ELV_unique.table_route_id,10);
10549: hr_utility.set_location(' r_ELV_unique.information1 '||r_ELV_unique.information1,10);
10579: l_object_found_in_target := TRUE;
10580: --
10581: if l_process_date between r_ELV_unique.information2 and r_ELV_unique.information3 then
10582: l_update := true;
10583: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10584: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10587: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELV_unique.information1 ;
10580: --
10581: if l_process_date between r_ELV_unique.information2 and r_ELV_unique.information3 then
10582: l_update := true;
10583: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10584: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10587: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELV_unique.information1 ;
10588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10581: if l_process_date between r_ELV_unique.information2 and r_ELV_unique.information3 then
10582: l_update := true;
10583: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10584: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10587: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELV_unique.information1 ;
10588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10582: l_update := true;
10583: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10584: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10587: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELV_unique.information1 ;
10588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10590: --
10583: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10584: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10587: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELV_unique.information1 ;
10588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10590: --
10591: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10584: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10587: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELV_unique.information1 ;
10588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10590: --
10591: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10592: --
10585: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10586: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10587: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELV_unique.information1 ;
10588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10590: --
10591: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10592: --
10593: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10587: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ELV_unique.information1 ;
10588: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10590: --
10591: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10592: --
10593: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10594: --
10595: -- log_data('ELV',l_new_value,l_prefix || r_ELV_unique.name|| l_suffix,'REUSED');
10589: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10590: --
10591: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10592: --
10593: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10594: --
10595: -- log_data('ELV',l_new_value,l_prefix || r_ELV_unique.name|| l_suffix,'REUSED');
10596: --
10597: end if ;
10610: open c_ELV_min_max_dates(r_ELV_unique.table_route_id, r_ELV_unique.information1 ) ;
10611: fetch c_ELV_min_max_dates into l_min_esd,l_max_eed ;
10612: --
10613:
10614: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10615: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10616: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10617: end if;
10618: l_min_esd := greatest(l_min_esd,r_ELV_unique.information2);
10611: fetch c_ELV_min_max_dates into l_min_esd,l_max_eed ;
10612: --
10613:
10614: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10615: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10616: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10617: end if;
10618: l_min_esd := greatest(l_min_esd,r_ELV_unique.information2);
10619: /**********************moved up from here **********************
10612: --
10613:
10614: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10615: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10616: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10617: end if;
10618: l_min_esd := greatest(l_min_esd,r_ELV_unique.information2);
10619: /**********************moved up from here **********************
10620: open c_ELV(r_ELV_unique.table_route_id,
10648: p_from_date => l_min_esd,
10649: p_to_date => l_max_eed );
10650: if l_dt_rec_found THEN
10651: --END TEMPIK
10652: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10653: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10649: p_to_date => l_max_eed );
10650: if l_dt_rec_found THEN
10651: --END TEMPIK
10652: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10653: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10650: if l_dt_rec_found THEN
10651: --END TEMPIK
10652: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10653: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10651: --END TEMPIK
10652: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10653: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10659: --
10652: if r_ELV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
10653: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10659: --
10660: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10653: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_LVG_RSN_PRTE_ID' then
10654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10659: --
10660: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10661: --
10654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV_unique.information1 ;
10656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10659: --
10660: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10661: --
10662: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10659: --
10660: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10661: --
10662: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10663: end if ;
10664: --
10658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10659: --
10660: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10661: --
10662: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10663: end if ;
10664: --
10665: l_object_found_in_target := true ;
10666: --TEMPIK
10694: end if ;
10695: --
10696:
10697: l_effective_date := r_ELV.information2;
10698: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10699: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10700: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10701: end if;
10702:
10695: --
10696:
10697: l_effective_date := r_ELV.information2;
10698: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10699: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10700: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10701: end if;
10702:
10703: if l_first_rec and not l_update then
10696:
10697: l_effective_date := r_ELV.information2;
10698: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10699: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10700: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10701: end if;
10702:
10703: if l_first_rec and not l_update then
10704: -- Call Create routine.
10760: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
10761: -- Update all relevent cer records with new pk_id
10762: hr_utility.set_location('Before plsql table ',222);
10763: hr_utility.set_location('new_value id '||l_elig_lvg_rsn_prte_id,222);
10764: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10765: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV.information1 ;
10766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LVG_RSN_PRTE_ID ;
10767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10761: -- Update all relevent cer records with new pk_id
10762: hr_utility.set_location('Before plsql table ',222);
10763: hr_utility.set_location('new_value id '||l_elig_lvg_rsn_prte_id,222);
10764: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10765: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV.information1 ;
10766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LVG_RSN_PRTE_ID ;
10767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10769: hr_utility.set_location('After plsql table ',222);
10762: hr_utility.set_location('Before plsql table ',222);
10763: hr_utility.set_location('new_value id '||l_elig_lvg_rsn_prte_id,222);
10764: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10765: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV.information1 ;
10766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LVG_RSN_PRTE_ID ;
10767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10769: hr_utility.set_location('After plsql table ',222);
10770: --
10763: hr_utility.set_location('new_value id '||l_elig_lvg_rsn_prte_id,222);
10764: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10765: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV.information1 ;
10766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LVG_RSN_PRTE_ID ;
10767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10769: hr_utility.set_location('After plsql table ',222);
10770: --
10771: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10764: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_LVG_RSN_PRTE_ID' ;
10765: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ELV.information1 ;
10766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_LVG_RSN_PRTE_ID ;
10767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10769: hr_utility.set_location('After plsql table ',222);
10770: --
10771: -- update_cer_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: --
10767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ELV_unique.table_route_id;
10769: hr_utility.set_location('After plsql table ',222);
10770: --
10771: -- update_cer_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: --
10773: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10774: --
10775: else
10769: hr_utility.set_location('After plsql table ',222);
10770: --
10771: -- update_cer_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: --
10773: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10774: --
10775: else
10776: --
10777: -- Call Update routine for the pk_id created in prev run .
10890: end loop;
10891: --
10892: exception when others then
10893: --
10894: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ELV',r_ELV.information5 ) ;
10895: --
10896: end create_ELV_rows;
10897:
10898:
11034: end if ;
11035: -- End Prefix Sufix derivation
11036: for r_EMP_unique in c_unique_EMP('EMP') loop
11037:
11038: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11039: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11040: r_EMP_unique.information3 >=
11041: ben_pd_copy_to_ben_one.g_copy_effective_date)
11042: ) then
11035: -- End Prefix Sufix derivation
11036: for r_EMP_unique in c_unique_EMP('EMP') loop
11037:
11038: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11039: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11040: r_EMP_unique.information3 >=
11041: ben_pd_copy_to_ben_one.g_copy_effective_date)
11042: ) then
11043: --
11037:
11038: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11039: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11040: r_EMP_unique.information3 >=
11041: ben_pd_copy_to_ben_one.g_copy_effective_date)
11042: ) then
11043: --
11044: hr_utility.set_location(' r_EMP_unique.table_route_id '||r_EMP_unique.table_route_id,10);
11045: hr_utility.set_location(' r_EMP_unique.information1 '||r_EMP_unique.information1,10);
11075: l_object_found_in_target := TRUE;
11076: --
11077: if l_process_date between r_EMP_unique.information2 and r_EMP_unique.information3 then
11078: l_update := true;
11079: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11080: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11082: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11083: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMP_unique.information1 ;
11076: --
11077: if l_process_date between r_EMP_unique.information2 and r_EMP_unique.information3 then
11078: l_update := true;
11079: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11080: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11082: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11083: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMP_unique.information1 ;
11084: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11077: if l_process_date between r_EMP_unique.information2 and r_EMP_unique.information3 then
11078: l_update := true;
11079: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11080: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11082: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11083: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMP_unique.information1 ;
11084: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11085: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11078: l_update := true;
11079: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11080: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11082: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11083: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMP_unique.information1 ;
11084: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11085: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11086: --
11079: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11080: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11082: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11083: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMP_unique.information1 ;
11084: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11085: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11086: --
11087: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11080: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11082: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11083: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMP_unique.information1 ;
11084: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11085: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11086: --
11087: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11088: --
11081: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11082: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11083: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMP_unique.information1 ;
11084: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11085: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11086: --
11087: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11088: --
11089: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11083: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMP_unique.information1 ;
11084: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11085: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11086: --
11087: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11088: --
11089: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11090: --
11091: -- log_data('EMP',l_new_value,l_prefix || r_EMP_unique.name|| l_suffix,'REUSED');
11085: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11086: --
11087: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11088: --
11089: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11090: --
11091: -- log_data('EMP',l_new_value,l_prefix || r_EMP_unique.name|| l_suffix,'REUSED');
11092: --
11093: end if ;
11106: open c_EMP_min_max_dates(r_EMP_unique.table_route_id, r_EMP_unique.information1 ) ;
11107: fetch c_EMP_min_max_dates into l_min_esd,l_max_eed ;
11108: --
11109:
11110: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11111: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11112: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11113: end if;
11114: l_min_esd := greatest(l_min_esd,r_EMP_unique.information2);
11107: fetch c_EMP_min_max_dates into l_min_esd,l_max_eed ;
11108: --
11109:
11110: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11111: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11112: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11113: end if;
11114: l_min_esd := greatest(l_min_esd,r_EMP_unique.information2);
11115: /**********************moved up from here **********************
11108: --
11109:
11110: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11111: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11112: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11113: end if;
11114: l_min_esd := greatest(l_min_esd,r_EMP_unique.information2);
11115: /**********************moved up from here **********************
11116: open c_EMP(r_EMP_unique.table_route_id,
11144: p_from_date => l_min_esd,
11145: p_to_date => l_max_eed );
11146: if l_dt_rec_found THEN
11147: --END TEMPIK
11148: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11149: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11145: p_to_date => l_max_eed );
11146: if l_dt_rec_found THEN
11147: --END TEMPIK
11148: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11149: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11146: if l_dt_rec_found THEN
11147: --END TEMPIK
11148: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11149: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11147: --END TEMPIK
11148: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11149: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11155: --
11148: if r_EMP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11149: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11155: --
11156: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11149: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STS_PRTE_ID' then
11150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11155: --
11156: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11157: --
11150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP_unique.information1 ;
11152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11155: --
11156: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11157: --
11158: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11155: --
11156: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11157: --
11158: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11159: end if ;
11160: --
11154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11155: --
11156: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11157: --
11158: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11159: end if ;
11160: --
11161: l_object_found_in_target := true ;
11162: --TEMPIK
11190: end if ;
11191: --
11192:
11193: l_effective_date := r_EMP.information2;
11194: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11195: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11196: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11197: end if;
11198:
11191: --
11192:
11193: l_effective_date := r_EMP.information2;
11194: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11195: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11196: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11197: end if;
11198:
11199: if l_first_rec and not l_update then
11192:
11193: l_effective_date := r_EMP.information2;
11194: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11195: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11196: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11197: end if;
11198:
11199: if l_first_rec and not l_update then
11200: -- Call Create routine.
11254: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
11255: -- Update all relevent cer records with new pk_id
11256: hr_utility.set_location('Before plsql table ',222);
11257: hr_utility.set_location('new_value id '||l_elig_mrtl_sts_prte_id,222);
11258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP.information1 ;
11260: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_MRTL_STS_PRTE_ID ;
11261: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11255: -- Update all relevent cer records with new pk_id
11256: hr_utility.set_location('Before plsql table ',222);
11257: hr_utility.set_location('new_value id '||l_elig_mrtl_sts_prte_id,222);
11258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP.information1 ;
11260: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_MRTL_STS_PRTE_ID ;
11261: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11263: hr_utility.set_location('After plsql table ',222);
11256: hr_utility.set_location('Before plsql table ',222);
11257: hr_utility.set_location('new_value id '||l_elig_mrtl_sts_prte_id,222);
11258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP.information1 ;
11260: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_MRTL_STS_PRTE_ID ;
11261: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11263: hr_utility.set_location('After plsql table ',222);
11264: --
11257: hr_utility.set_location('new_value id '||l_elig_mrtl_sts_prte_id,222);
11258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP.information1 ;
11260: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_MRTL_STS_PRTE_ID ;
11261: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11263: hr_utility.set_location('After plsql table ',222);
11264: --
11265: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STS_PRTE_ID' ;
11259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMP.information1 ;
11260: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_MRTL_STS_PRTE_ID ;
11261: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11263: hr_utility.set_location('After plsql table ',222);
11264: --
11265: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11266: --
11261: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMP_unique.table_route_id;
11263: hr_utility.set_location('After plsql table ',222);
11264: --
11265: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11266: --
11267: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11268: --
11269: else
11263: hr_utility.set_location('After plsql table ',222);
11264: --
11265: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11266: --
11267: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11268: --
11269: else
11270: --
11271: -- Call Update routine for the pk_id created in prev run .
11384: end loop;
11385: --
11386: exception when others then
11387: --
11388: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EMP',r_EMP.information5 ) ;
11389: --
11390: end create_EMP_rows;
11391:
11392:
11528: end if ;
11529: -- End Prefix Sufix derivation
11530: for r_ENO_unique in c_unique_ENO('ENO') loop
11531:
11532: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11533: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11534: r_ENO_unique.information3 >=
11535: ben_pd_copy_to_ben_one.g_copy_effective_date)
11536: ) then
11529: -- End Prefix Sufix derivation
11530: for r_ENO_unique in c_unique_ENO('ENO') loop
11531:
11532: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11533: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11534: r_ENO_unique.information3 >=
11535: ben_pd_copy_to_ben_one.g_copy_effective_date)
11536: ) then
11537: --
11531:
11532: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11533: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11534: r_ENO_unique.information3 >=
11535: ben_pd_copy_to_ben_one.g_copy_effective_date)
11536: ) then
11537: --
11538: hr_utility.set_location(' r_ENO_unique.table_route_id '||r_ENO_unique.table_route_id,10);
11539: hr_utility.set_location(' r_ENO_unique.information1 '||r_ENO_unique.information1,10);
11569: l_object_found_in_target := TRUE;
11570: --
11571: if l_process_date between r_ENO_unique.information2 and r_ENO_unique.information3 then
11572: l_update := true;
11573: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11574: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENO_unique.information1 ;
11570: --
11571: if l_process_date between r_ENO_unique.information2 and r_ENO_unique.information3 then
11572: l_update := true;
11573: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11574: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENO_unique.information1 ;
11578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11571: if l_process_date between r_ENO_unique.information2 and r_ENO_unique.information3 then
11572: l_update := true;
11573: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11574: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENO_unique.information1 ;
11578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11572: l_update := true;
11573: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11574: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENO_unique.information1 ;
11578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11580: --
11573: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11574: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENO_unique.information1 ;
11578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11580: --
11581: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11574: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENO_unique.information1 ;
11578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11580: --
11581: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11582: --
11575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENO_unique.information1 ;
11578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11580: --
11581: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11582: --
11583: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENO_unique.information1 ;
11578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11580: --
11581: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11582: --
11583: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11584: --
11585: -- log_data('ENO',l_new_value,l_prefix || r_ENO_unique.name|| l_suffix,'REUSED');
11579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11580: --
11581: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11582: --
11583: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11584: --
11585: -- log_data('ENO',l_new_value,l_prefix || r_ENO_unique.name|| l_suffix,'REUSED');
11586: --
11587: end if ;
11600: open c_ENO_min_max_dates(r_ENO_unique.table_route_id, r_ENO_unique.information1 ) ;
11601: fetch c_ENO_min_max_dates into l_min_esd,l_max_eed ;
11602: --
11603:
11604: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11605: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11606: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11607: end if;
11608: l_min_esd := greatest(l_min_esd,r_ENO_unique.information2);
11601: fetch c_ENO_min_max_dates into l_min_esd,l_max_eed ;
11602: --
11603:
11604: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11605: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11606: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11607: end if;
11608: l_min_esd := greatest(l_min_esd,r_ENO_unique.information2);
11609: /**********************moved up from here **********************
11602: --
11603:
11604: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11605: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11606: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11607: end if;
11608: l_min_esd := greatest(l_min_esd,r_ENO_unique.information2);
11609: /**********************moved up from here **********************
11610: open c_ENO(r_ENO_unique.table_route_id,
11637: p_from_date => l_min_esd,
11638: p_to_date => l_max_eed );
11639: if l_dt_rec_found THEN
11640: --END TEMPIK
11641: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11642: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11638: p_to_date => l_max_eed );
11639: if l_dt_rec_found THEN
11640: --END TEMPIK
11641: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11642: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11639: if l_dt_rec_found THEN
11640: --END TEMPIK
11641: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11642: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11640: --END TEMPIK
11641: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11642: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11648: --
11641: if r_ENO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
11642: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11648: --
11649: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11642: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_NO_OTHR_CVG_PRTE_ID' then
11643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11648: --
11649: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11650: --
11643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11644: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO_unique.information1 ;
11645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11648: --
11649: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11650: --
11651: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11648: --
11649: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11650: --
11651: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11652: end if ;
11653: --
11647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11648: --
11649: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11650: --
11651: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11652: end if ;
11653: --
11654: l_object_found_in_target := true ;
11655: --TEMPIK
11683: end if ;
11684: --
11685:
11686: l_effective_date := r_ENO.information2;
11687: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11688: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11689: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11690: end if;
11691:
11684: --
11685:
11686: l_effective_date := r_ENO.information2;
11687: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11688: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11689: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11690: end if;
11691:
11692: if l_first_rec and not l_update then
11685:
11686: l_effective_date := r_ENO.information2;
11687: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11688: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11689: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11690: end if;
11691:
11692: if l_first_rec and not l_update then
11693: -- Call Create routine.
11744: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
11745: -- Update all relevent cer records with new pk_id
11746: hr_utility.set_location('Before plsql table ',222);
11747: hr_utility.set_location('new_value id '||l_elig_no_othr_cvg_prte_id,222);
11748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO.information1 ;
11750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_NO_OTHR_CVG_PRTE_ID ;
11751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11745: -- Update all relevent cer records with new pk_id
11746: hr_utility.set_location('Before plsql table ',222);
11747: hr_utility.set_location('new_value id '||l_elig_no_othr_cvg_prte_id,222);
11748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO.information1 ;
11750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_NO_OTHR_CVG_PRTE_ID ;
11751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11753: hr_utility.set_location('After plsql table ',222);
11746: hr_utility.set_location('Before plsql table ',222);
11747: hr_utility.set_location('new_value id '||l_elig_no_othr_cvg_prte_id,222);
11748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO.information1 ;
11750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_NO_OTHR_CVG_PRTE_ID ;
11751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11753: hr_utility.set_location('After plsql table ',222);
11754: --
11747: hr_utility.set_location('new_value id '||l_elig_no_othr_cvg_prte_id,222);
11748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO.information1 ;
11750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_NO_OTHR_CVG_PRTE_ID ;
11751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11753: hr_utility.set_location('After plsql table ',222);
11754: --
11755: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_NO_OTHR_CVG_PRTE_ID' ;
11749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENO.information1 ;
11750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_NO_OTHR_CVG_PRTE_ID ;
11751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11753: hr_utility.set_location('After plsql table ',222);
11754: --
11755: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11756: --
11751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENO_unique.table_route_id;
11753: hr_utility.set_location('After plsql table ',222);
11754: --
11755: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11756: --
11757: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11758: --
11759: else
11753: hr_utility.set_location('After plsql table ',222);
11754: --
11755: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11756: --
11757: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11758: --
11759: else
11760: --
11761: -- Call Update routine for the pk_id created in prev run .
11870: end loop;
11871: --
11872: exception when others then
11873: --
11874: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ENO',r_ENO.information5 ) ;
11875: --
11876: end create_ENO_rows;
11877:
11878:
12013: end if ;
12014: -- End Prefix Sufix derivation
12015: for r_EOM_unique in c_unique_EOM('EOM') loop
12016:
12017: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12018: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12019: r_EOM_unique.information3 >=
12020: ben_pd_copy_to_ben_one.g_copy_effective_date)
12021: ) then
12014: -- End Prefix Sufix derivation
12015: for r_EOM_unique in c_unique_EOM('EOM') loop
12016:
12017: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12018: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12019: r_EOM_unique.information3 >=
12020: ben_pd_copy_to_ben_one.g_copy_effective_date)
12021: ) then
12022: --
12016:
12017: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12018: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12019: r_EOM_unique.information3 >=
12020: ben_pd_copy_to_ben_one.g_copy_effective_date)
12021: ) then
12022: --
12023: hr_utility.set_location(' r_EOM_unique.table_route_id '||r_EOM_unique.table_route_id,10);
12024: hr_utility.set_location(' r_EOM_unique.information1 '||r_EOM_unique.information1,10);
12054: l_object_found_in_target := TRUE;
12055: --
12056: if l_process_date between r_EOM_unique.information2 and r_EOM_unique.information3 then
12057: l_update := true;
12058: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12059: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12061: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12062: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOM_unique.information1 ;
12055: --
12056: if l_process_date between r_EOM_unique.information2 and r_EOM_unique.information3 then
12057: l_update := true;
12058: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12059: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12061: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12062: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOM_unique.information1 ;
12063: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12056: if l_process_date between r_EOM_unique.information2 and r_EOM_unique.information3 then
12057: l_update := true;
12058: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12059: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12061: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12062: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOM_unique.information1 ;
12063: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12064: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12057: l_update := true;
12058: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12059: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12061: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12062: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOM_unique.information1 ;
12063: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12064: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12065: --
12058: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12059: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12061: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12062: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOM_unique.information1 ;
12063: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12064: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12065: --
12066: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12059: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12061: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12062: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOM_unique.information1 ;
12063: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12064: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12065: --
12066: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12067: --
12060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12061: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12062: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOM_unique.information1 ;
12063: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12064: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12065: --
12066: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12067: --
12068: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12062: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOM_unique.information1 ;
12063: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12064: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12065: --
12066: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12067: --
12068: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12069: --
12070: -- log_data('EOM',l_new_value,l_prefix || r_EOM_unique.name|| l_suffix,'REUSED');
12064: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12065: --
12066: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12067: --
12068: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12069: --
12070: -- log_data('EOM',l_new_value,l_prefix || r_EOM_unique.name|| l_suffix,'REUSED');
12071: --
12072: end if ;
12085: open c_EOM_min_max_dates(r_EOM_unique.table_route_id, r_EOM_unique.information1 ) ;
12086: fetch c_EOM_min_max_dates into l_min_esd,l_max_eed ;
12087: --
12088:
12089: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12090: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12091: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12092: end if;
12093:
12086: fetch c_EOM_min_max_dates into l_min_esd,l_max_eed ;
12087: --
12088:
12089: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12090: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12091: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12092: end if;
12093:
12094: l_min_esd := greatest(l_min_esd,r_EOM_unique.information2);
12087: --
12088:
12089: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12090: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12091: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12092: end if;
12093:
12094: l_min_esd := greatest(l_min_esd,r_EOM_unique.information2);
12095: /**********************moved up from here **********************
12123: p_from_date => l_min_esd,
12124: p_to_date => l_max_eed );
12125: if l_dt_rec_found THEN
12126: --END TEMPIK
12127: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12128: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12124: p_to_date => l_max_eed );
12125: if l_dt_rec_found THEN
12126: --END TEMPIK
12127: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12128: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12125: if l_dt_rec_found THEN
12126: --END TEMPIK
12127: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12128: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12126: --END TEMPIK
12127: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12128: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12134: --
12127: if r_EOM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12128: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12134: --
12135: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12128: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OPTD_MDCR_PRTE_ID' then
12129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12134: --
12135: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12136: --
12129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM_unique.information1 ;
12131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12134: --
12135: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12136: --
12137: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12134: --
12135: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12136: --
12137: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12138: end if ;
12139: --
12133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12134: --
12135: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12136: --
12137: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12138: end if ;
12139: --
12140: l_object_found_in_target := true ;
12141: --TEMPIK
12169: end if ;
12170: --
12171:
12172: l_effective_date := r_EOM.information2;
12173: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12174: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12175: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12176: end if;
12177:
12170: --
12171:
12172: l_effective_date := r_EOM.information2;
12173: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12174: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12175: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12176: end if;
12177:
12178: if l_first_rec and not l_update then
12171:
12172: l_effective_date := r_EOM.information2;
12173: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12174: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12175: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12176: end if;
12177:
12178: if l_first_rec and not l_update then
12179: -- Call Create routine.
12231: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
12232: -- Update all relevent cer records with new pk_id
12233: hr_utility.set_location('Before plsql table ',222);
12234: hr_utility.set_location('new_value id '||l_elig_optd_mdcr_prte_id,222);
12235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12236: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM.information1 ;
12237: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OPTD_MDCR_PRTE_ID ;
12238: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12239: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12232: -- Update all relevent cer records with new pk_id
12233: hr_utility.set_location('Before plsql table ',222);
12234: hr_utility.set_location('new_value id '||l_elig_optd_mdcr_prte_id,222);
12235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12236: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM.information1 ;
12237: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OPTD_MDCR_PRTE_ID ;
12238: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12239: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12240: hr_utility.set_location('After plsql table ',222);
12233: hr_utility.set_location('Before plsql table ',222);
12234: hr_utility.set_location('new_value id '||l_elig_optd_mdcr_prte_id,222);
12235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12236: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM.information1 ;
12237: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OPTD_MDCR_PRTE_ID ;
12238: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12239: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12240: hr_utility.set_location('After plsql table ',222);
12241: --
12234: hr_utility.set_location('new_value id '||l_elig_optd_mdcr_prte_id,222);
12235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12236: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM.information1 ;
12237: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OPTD_MDCR_PRTE_ID ;
12238: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12239: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12240: hr_utility.set_location('After plsql table ',222);
12241: --
12242: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OPTD_MDCR_PRTE_ID' ;
12236: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOM.information1 ;
12237: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OPTD_MDCR_PRTE_ID ;
12238: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12239: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12240: hr_utility.set_location('After plsql table ',222);
12241: --
12242: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12243: --
12238: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12239: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOM_unique.table_route_id;
12240: hr_utility.set_location('After plsql table ',222);
12241: --
12242: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12243: --
12244: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12245: --
12246: else
12240: hr_utility.set_location('After plsql table ',222);
12241: --
12242: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12243: --
12244: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12245: --
12246: else
12247: --
12248: -- Call Update routine for the pk_id created in prev run .
12357: --
12358: end loop;
12359: exception when others then
12360: --
12361: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EOM',r_EOM.information5 ) ;
12362: --
12363: --
12364: end create_EOM_rows;
12365: --
12498: end if ;
12499: -- End Prefix Sufix derivation
12500: for r_EOU_unique in c_unique_EOU('EOU') loop
12501:
12502: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12503: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12504: r_EOU_unique.information3 >=
12505: ben_pd_copy_to_ben_one.g_copy_effective_date)
12506: ) then
12499: -- End Prefix Sufix derivation
12500: for r_EOU_unique in c_unique_EOU('EOU') loop
12501:
12502: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12503: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12504: r_EOU_unique.information3 >=
12505: ben_pd_copy_to_ben_one.g_copy_effective_date)
12506: ) then
12507: --
12501:
12502: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12503: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12504: r_EOU_unique.information3 >=
12505: ben_pd_copy_to_ben_one.g_copy_effective_date)
12506: ) then
12507: --
12508: hr_utility.set_location(' r_EOU_unique.table_route_id '||r_EOU_unique.table_route_id,10);
12509: hr_utility.set_location(' r_EOU_unique.information1 '||r_EOU_unique.information1,10);
12529: --
12530: close c_EOU ;
12531: --
12532: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EOU.INFORMATION263,l_dml_operation);
12533: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
12534: l_ORGANIZATION_ID := r_EOU.information176;
12535: else
12536: l_ORGANIZATION_ID := r_EOU.information174;
12537: end if;
12543: l_object_found_in_target := TRUE;
12544: --
12545: if l_process_date between r_EOU_unique.information2 and r_EOU_unique.information3 then
12546: l_update := true;
12547: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12548: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOU_unique.information1 ;
12544: --
12545: if l_process_date between r_EOU_unique.information2 and r_EOU_unique.information3 then
12546: l_update := true;
12547: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12548: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOU_unique.information1 ;
12552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12545: if l_process_date between r_EOU_unique.information2 and r_EOU_unique.information3 then
12546: l_update := true;
12547: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12548: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOU_unique.information1 ;
12552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12546: l_update := true;
12547: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12548: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOU_unique.information1 ;
12552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12554: --
12547: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12548: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOU_unique.information1 ;
12552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12554: --
12555: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12548: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOU_unique.information1 ;
12552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12554: --
12555: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12556: --
12549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOU_unique.information1 ;
12552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12554: --
12555: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12556: --
12557: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOU_unique.information1 ;
12552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12554: --
12555: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12556: --
12557: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12558: --
12559: -- log_data('EOU',l_new_value,l_prefix || r_EOU_unique.name|| l_suffix,'REUSED');
12553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12554: --
12555: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12556: --
12557: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12558: --
12559: -- log_data('EOU',l_new_value,l_prefix || r_EOU_unique.name|| l_suffix,'REUSED');
12560: --
12561: end if ;
12574: open c_EOU_min_max_dates(r_EOU_unique.table_route_id, r_EOU_unique.information1 ) ;
12575: fetch c_EOU_min_max_dates into l_min_esd,l_max_eed ;
12576: --
12577:
12578: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12579: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12580: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12581: end if;
12582: l_min_esd := greatest(l_min_esd,r_EOU_unique.information2);
12575: fetch c_EOU_min_max_dates into l_min_esd,l_max_eed ;
12576: --
12577:
12578: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12579: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12580: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12581: end if;
12582: l_min_esd := greatest(l_min_esd,r_EOU_unique.information2);
12583: /**********************moved up from here **********************
12576: --
12577:
12578: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12579: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12580: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12581: end if;
12582: l_min_esd := greatest(l_min_esd,r_EOU_unique.information2);
12583: /**********************moved up from here **********************
12584: open c_EOU(r_EOU_unique.table_route_id,
12590: --
12591: close c_EOU ;
12592: --
12593: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EOU.INFORMATION263,l_dml_operation);
12594: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
12595: l_ORGANIZATION_ID := r_EOU.information176;
12596: else
12597: l_ORGANIZATION_ID := r_EOU.information174;
12598: end if;
12627: p_from_date => l_min_esd,
12628: p_to_date => l_max_eed );
12629: if l_dt_rec_found THEN
12630: --END TEMPIK
12631: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12632: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12628: p_to_date => l_max_eed );
12629: if l_dt_rec_found THEN
12630: --END TEMPIK
12631: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12632: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12629: if l_dt_rec_found THEN
12630: --END TEMPIK
12631: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12632: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12630: --END TEMPIK
12631: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12632: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12638: --
12631: if r_EOU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
12632: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12638: --
12639: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12632: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ORG_UNIT_PRTE_ID' then
12633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12638: --
12639: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12640: --
12633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU_unique.information1 ;
12635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12638: --
12639: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12640: --
12641: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12638: --
12639: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12640: --
12641: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12642: end if ;
12643: --
12637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12638: --
12639: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12640: --
12641: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12642: end if ;
12643: --
12644: l_object_found_in_target := true ;
12645: --TEMPIK
12677: end if ;
12678: --
12679:
12680: l_effective_date := r_EOU.information2;
12681: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12682: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12683: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12684: end if;
12685:
12678: --
12679:
12680: l_effective_date := r_EOU.information2;
12681: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12682: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12683: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12684: end if;
12685:
12686: if l_first_rec and not l_update then
12679:
12680: l_effective_date := r_EOU.information2;
12681: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12682: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12683: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12684: end if;
12685:
12686: if l_first_rec and not l_update then
12687: -- Call Create routine.
12742: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
12743: -- Update all relevent cer records with new pk_id
12744: hr_utility.set_location('Before plsql table ',222);
12745: hr_utility.set_location('new_value id '||l_elig_org_unit_prte_id,222);
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ORG_UNIT_PRTE_ID ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12743: -- Update all relevent cer records with new pk_id
12744: hr_utility.set_location('Before plsql table ',222);
12745: hr_utility.set_location('new_value id '||l_elig_org_unit_prte_id,222);
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ORG_UNIT_PRTE_ID ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12751: hr_utility.set_location('After plsql table ',222);
12744: hr_utility.set_location('Before plsql table ',222);
12745: hr_utility.set_location('new_value id '||l_elig_org_unit_prte_id,222);
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ORG_UNIT_PRTE_ID ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12751: hr_utility.set_location('After plsql table ',222);
12752: --
12745: hr_utility.set_location('new_value id '||l_elig_org_unit_prte_id,222);
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ORG_UNIT_PRTE_ID ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12751: hr_utility.set_location('After plsql table ',222);
12752: --
12753: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ORG_UNIT_PRTE_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOU.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ORG_UNIT_PRTE_ID ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12751: hr_utility.set_location('After plsql table ',222);
12752: --
12753: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12754: --
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOU_unique.table_route_id;
12751: hr_utility.set_location('After plsql table ',222);
12752: --
12753: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12754: --
12755: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12756: --
12757: else
12751: hr_utility.set_location('After plsql table ',222);
12752: --
12753: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12754: --
12755: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12756: --
12757: else
12758: --
12759: -- Call Update routine for the pk_id created in prev run .
12874: end loop;
12875: --
12876: exception when others then
12877: --
12878: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EOU',r_EOU.information5 ) ;
12879: --
12880: end create_EOU_rows;
12881:
12882:
13018: end if ;
13019: -- End Prefix Sufix derivation
13020: for r_EOY_unique in c_unique_EOY('EOY') loop
13021:
13022: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13023: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13024: r_EOY_unique.information3 >=
13025: ben_pd_copy_to_ben_one.g_copy_effective_date)
13026: ) then
13019: -- End Prefix Sufix derivation
13020: for r_EOY_unique in c_unique_EOY('EOY') loop
13021:
13022: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13023: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13024: r_EOY_unique.information3 >=
13025: ben_pd_copy_to_ben_one.g_copy_effective_date)
13026: ) then
13027: --
13021:
13022: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13023: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13024: r_EOY_unique.information3 >=
13025: ben_pd_copy_to_ben_one.g_copy_effective_date)
13026: ) then
13027: --
13028: hr_utility.set_location(' r_EOY_unique.table_route_id '||r_EOY_unique.table_route_id,10);
13029: hr_utility.set_location(' r_EOY_unique.information1 '||r_EOY_unique.information1,10);
13061: l_object_found_in_target := TRUE;
13062: --
13063: if l_process_date between r_EOY_unique.information2 and r_EOY_unique.information3 then
13064: l_update := true;
13065: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13066: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOY_unique.information1 ;
13062: --
13063: if l_process_date between r_EOY_unique.information2 and r_EOY_unique.information3 then
13064: l_update := true;
13065: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13066: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOY_unique.information1 ;
13070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13063: if l_process_date between r_EOY_unique.information2 and r_EOY_unique.information3 then
13064: l_update := true;
13065: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13066: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOY_unique.information1 ;
13070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13064: l_update := true;
13065: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13066: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOY_unique.information1 ;
13070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13072: --
13065: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13066: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOY_unique.information1 ;
13070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13072: --
13073: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13066: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOY_unique.information1 ;
13070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13072: --
13073: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13074: --
13067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOY_unique.information1 ;
13070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13072: --
13073: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13074: --
13075: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOY_unique.information1 ;
13070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13072: --
13073: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13074: --
13075: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13076: --
13077: -- log_data('EOY',l_new_value,l_prefix || r_EOY_unique.name|| l_suffix,'REUSED');
13071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13072: --
13073: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13074: --
13075: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13076: --
13077: -- log_data('EOY',l_new_value,l_prefix || r_EOY_unique.name|| l_suffix,'REUSED');
13078: --
13079: end if ;
13092: open c_EOY_min_max_dates(r_EOY_unique.table_route_id, r_EOY_unique.information1 ) ;
13093: fetch c_EOY_min_max_dates into l_min_esd,l_max_eed ;
13094: --
13095:
13096: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13097: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13098: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13099: end if;
13100: l_min_esd := greatest(l_min_esd,r_EOY_unique.information2);
13093: fetch c_EOY_min_max_dates into l_min_esd,l_max_eed ;
13094: --
13095:
13096: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13097: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13098: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13099: end if;
13100: l_min_esd := greatest(l_min_esd,r_EOY_unique.information2);
13101: /**********************moved up from here **********************
13094: --
13095:
13096: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13097: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13098: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13099: end if;
13100: l_min_esd := greatest(l_min_esd,r_EOY_unique.information2);
13101: /**********************moved up from here **********************
13102: open c_EOY(r_EOY_unique.table_route_id,
13131: p_from_date => l_min_esd,
13132: p_to_date => l_max_eed );
13133: if l_dt_rec_found THEN
13134: --END TEMPIK
13135: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13136: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13132: p_to_date => l_max_eed );
13133: if l_dt_rec_found THEN
13134: --END TEMPIK
13135: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13136: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13133: if l_dt_rec_found THEN
13134: --END TEMPIK
13135: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13136: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13134: --END TEMPIK
13135: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13136: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13142: --
13135: if r_EOY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13136: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13142: --
13143: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13136: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_OTHR_PTIP_PRTE_ID' then
13137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13142: --
13143: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13144: --
13137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY_unique.information1 ;
13139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13142: --
13143: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13144: --
13145: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13142: --
13143: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13144: --
13145: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13146: end if ;
13147: --
13141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13142: --
13143: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13144: --
13145: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13146: end if ;
13147: --
13148: l_object_found_in_target := true ;
13149: --TEMPIK
13177: end if ;
13178: --
13179:
13180: l_effective_date := r_EOY.information2;
13181: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13182: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13183: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13184: end if;
13185:
13178: --
13179:
13180: l_effective_date := r_EOY.information2;
13181: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13182: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13183: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13184: end if;
13185:
13186: if l_first_rec and not l_update then
13179:
13180: l_effective_date := r_EOY.information2;
13181: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13182: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13183: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13184: end if;
13185:
13186: if l_first_rec and not l_update then
13187: -- Call Create routine.
13241: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
13242: -- Update all relevent cer records with new pk_id
13243: hr_utility.set_location('Before plsql table ',222);
13244: hr_utility.set_location('new_value id '||l_elig_othr_ptip_prte_id,222);
13245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY.information1 ;
13247: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OTHR_PTIP_PRTE_ID ;
13248: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13249: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13242: -- Update all relevent cer records with new pk_id
13243: hr_utility.set_location('Before plsql table ',222);
13244: hr_utility.set_location('new_value id '||l_elig_othr_ptip_prte_id,222);
13245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY.information1 ;
13247: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OTHR_PTIP_PRTE_ID ;
13248: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13249: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13250: hr_utility.set_location('After plsql table ',222);
13243: hr_utility.set_location('Before plsql table ',222);
13244: hr_utility.set_location('new_value id '||l_elig_othr_ptip_prte_id,222);
13245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY.information1 ;
13247: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OTHR_PTIP_PRTE_ID ;
13248: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13249: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13250: hr_utility.set_location('After plsql table ',222);
13251: --
13244: hr_utility.set_location('new_value id '||l_elig_othr_ptip_prte_id,222);
13245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY.information1 ;
13247: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OTHR_PTIP_PRTE_ID ;
13248: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13249: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13250: hr_utility.set_location('After plsql table ',222);
13251: --
13252: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_OTHR_PTIP_PRTE_ID' ;
13246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOY.information1 ;
13247: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_OTHR_PTIP_PRTE_ID ;
13248: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13249: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13250: hr_utility.set_location('After plsql table ',222);
13251: --
13252: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13253: --
13248: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13249: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOY_unique.table_route_id;
13250: hr_utility.set_location('After plsql table ',222);
13251: --
13252: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13253: --
13254: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13255: --
13256: else
13250: hr_utility.set_location('After plsql table ',222);
13251: --
13252: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13253: --
13254: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13255: --
13256: else
13257: --
13258: -- Call Update routine for the pk_id created in prev run .
13370: end loop;
13371: --
13372: exception when others then
13373: --
13374: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EOY',r_EOY.information5 ) ;
13375: --
13376: end create_EOY_rows;
13377:
13378:
13517: end if ;
13518: -- End Prefix Sufix derivation
13519: for r_EPF_unique in c_unique_EPF('EPF') loop
13520:
13521: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13522: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13523: r_EPF_unique.information3 >=
13524: ben_pd_copy_to_ben_one.g_copy_effective_date)
13525: ) then
13518: -- End Prefix Sufix derivation
13519: for r_EPF_unique in c_unique_EPF('EPF') loop
13520:
13521: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13522: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13523: r_EPF_unique.information3 >=
13524: ben_pd_copy_to_ben_one.g_copy_effective_date)
13525: ) then
13526: --
13520:
13521: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13522: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13523: r_EPF_unique.information3 >=
13524: ben_pd_copy_to_ben_one.g_copy_effective_date)
13525: ) then
13526: --
13527: hr_utility.set_location(' r_EPF_unique.table_route_id '||r_EPF_unique.table_route_id,10);
13528: hr_utility.set_location(' r_EPF_unique.information1 '||r_EPF_unique.information1,10);
13558: l_object_found_in_target := TRUE;
13559: --
13560: if l_process_date between r_EPF_unique.information2 and r_EPF_unique.information3 then
13561: l_update := true;
13562: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13563: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13565: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPF_unique.information1 ;
13559: --
13560: if l_process_date between r_EPF_unique.information2 and r_EPF_unique.information3 then
13561: l_update := true;
13562: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13563: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13565: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPF_unique.information1 ;
13567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13560: if l_process_date between r_EPF_unique.information2 and r_EPF_unique.information3 then
13561: l_update := true;
13562: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13563: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13565: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPF_unique.information1 ;
13567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13561: l_update := true;
13562: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13563: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13565: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPF_unique.information1 ;
13567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13569: --
13562: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13563: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13565: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPF_unique.information1 ;
13567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13569: --
13570: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13563: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13565: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPF_unique.information1 ;
13567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13569: --
13570: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13571: --
13564: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13565: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPF_unique.information1 ;
13567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13569: --
13570: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13571: --
13572: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13566: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPF_unique.information1 ;
13567: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13569: --
13570: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13571: --
13572: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13573: --
13574: -- log_data('EPF',l_new_value,l_prefix || r_EPF_unique.name|| l_suffix,'REUSED');
13568: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13569: --
13570: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13571: --
13572: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13573: --
13574: -- log_data('EPF',l_new_value,l_prefix || r_EPF_unique.name|| l_suffix,'REUSED');
13575: --
13576: end if ;
13589: open c_EPF_min_max_dates(r_EPF_unique.table_route_id, r_EPF_unique.information1 ) ;
13590: fetch c_EPF_min_max_dates into l_min_esd,l_max_eed ;
13591: --
13592:
13593: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13594: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13595: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13596: end if;
13597:
13590: fetch c_EPF_min_max_dates into l_min_esd,l_max_eed ;
13591: --
13592:
13593: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13594: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13595: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13596: end if;
13597:
13598: l_min_esd := greatest(l_min_esd,r_EPF_unique.information2);
13591: --
13592:
13593: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13594: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13595: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13596: end if;
13597:
13598: l_min_esd := greatest(l_min_esd,r_EPF_unique.information2);
13599: /**********************moved up from here **********************
13628: p_from_date => l_min_esd,
13629: p_to_date => l_max_eed );
13630: if l_dt_rec_found THEN
13631: --END TEMPIK
13632: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13633: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13629: p_to_date => l_max_eed );
13630: if l_dt_rec_found THEN
13631: --END TEMPIK
13632: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13633: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13630: if l_dt_rec_found THEN
13631: --END TEMPIK
13632: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13633: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13631: --END TEMPIK
13632: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13633: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13639: --
13632: if r_EPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
13633: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13639: --
13640: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13633: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PCT_FL_TM_PRTE_ID' then
13634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13639: --
13640: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13641: --
13634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF_unique.information1 ;
13636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13639: --
13640: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13641: --
13642: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13639: --
13640: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13641: --
13642: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13643: end if ;
13644: --
13638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13639: --
13640: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13641: --
13642: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13643: end if ;
13644: --
13645: l_object_found_in_target := true ;
13646: --TEMPIK
13674: end if ;
13675: --
13676:
13677: l_effective_date := r_EPF.information2;
13678: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13679: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13680: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13681: end if;
13682:
13675: --
13676:
13677: l_effective_date := r_EPF.information2;
13678: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13679: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13680: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13681: end if;
13682:
13683: if l_first_rec and not l_update then
13676:
13677: l_effective_date := r_EPF.information2;
13678: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13679: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13680: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13681: end if;
13682:
13683: if l_first_rec and not l_update then
13684: -- Call Create routine.
13739: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
13740: -- Update all relevent cer records with new pk_id
13741: hr_utility.set_location('Before plsql table ',222);
13742: hr_utility.set_location('new_value id '||l_elig_pct_fl_tm_prte_id,222);
13743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF.information1 ;
13745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PCT_FL_TM_PRTE_ID ;
13746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13740: -- Update all relevent cer records with new pk_id
13741: hr_utility.set_location('Before plsql table ',222);
13742: hr_utility.set_location('new_value id '||l_elig_pct_fl_tm_prte_id,222);
13743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF.information1 ;
13745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PCT_FL_TM_PRTE_ID ;
13746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13748: hr_utility.set_location('After plsql table ',222);
13741: hr_utility.set_location('Before plsql table ',222);
13742: hr_utility.set_location('new_value id '||l_elig_pct_fl_tm_prte_id,222);
13743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF.information1 ;
13745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PCT_FL_TM_PRTE_ID ;
13746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13748: hr_utility.set_location('After plsql table ',222);
13749: --
13742: hr_utility.set_location('new_value id '||l_elig_pct_fl_tm_prte_id,222);
13743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF.information1 ;
13745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PCT_FL_TM_PRTE_ID ;
13746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13748: hr_utility.set_location('After plsql table ',222);
13749: --
13750: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PCT_FL_TM_PRTE_ID' ;
13744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPF.information1 ;
13745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PCT_FL_TM_PRTE_ID ;
13746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13748: hr_utility.set_location('After plsql table ',222);
13749: --
13750: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13751: --
13746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPF_unique.table_route_id;
13748: hr_utility.set_location('After plsql table ',222);
13749: --
13750: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13751: --
13752: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13753: --
13754: else
13748: hr_utility.set_location('After plsql table ',222);
13749: --
13750: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13751: --
13752: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13753: --
13754: else
13755: --
13756: -- Call Update routine for the pk_id created in prev run .
13869: end loop;
13870: --
13871: exception when others then
13872: --
13873: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPF',r_EPF.information5 ) ;
13874: --
13875: end create_EPF_rows;
13876:
13877: --
14014: end if ;
14015: -- End Prefix Sufix derivation
14016: for r_EPT_unique in c_unique_EPT('EPT') loop
14017:
14018: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14019: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14020: r_EPT_unique.information3 >=
14021: ben_pd_copy_to_ben_one.g_copy_effective_date)
14022: ) then
14015: -- End Prefix Sufix derivation
14016: for r_EPT_unique in c_unique_EPT('EPT') loop
14017:
14018: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14019: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14020: r_EPT_unique.information3 >=
14021: ben_pd_copy_to_ben_one.g_copy_effective_date)
14022: ) then
14023: --
14017:
14018: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14019: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14020: r_EPT_unique.information3 >=
14021: ben_pd_copy_to_ben_one.g_copy_effective_date)
14022: ) then
14023: --
14024: hr_utility.set_location(' r_EPT_unique.table_route_id '||r_EPT_unique.table_route_id,10);
14025: hr_utility.set_location(' r_EPT_unique.information1 '||r_EPT_unique.information1,10);
14047: close c_EPT ;
14048: --
14049: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EPT.INFORMATION263,l_dml_operation);
14050:
14051: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
14052: l_PERSON_TYPE_ID := r_EPT.information176;
14053: else
14054: l_PERSON_TYPE_ID := r_EPT.information174;
14055: end if;
14062: l_object_found_in_target := TRUE;
14063: --
14064: if l_process_date between r_EPT_unique.information2 and r_EPT_unique.information3 then
14065: l_update := true;
14066: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14067: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPT_unique.information1 ;
14063: --
14064: if l_process_date between r_EPT_unique.information2 and r_EPT_unique.information3 then
14065: l_update := true;
14066: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14067: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPT_unique.information1 ;
14071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14064: if l_process_date between r_EPT_unique.information2 and r_EPT_unique.information3 then
14065: l_update := true;
14066: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14067: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPT_unique.information1 ;
14071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14065: l_update := true;
14066: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14067: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPT_unique.information1 ;
14071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14073: --
14066: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14067: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPT_unique.information1 ;
14071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14073: --
14074: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14067: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPT_unique.information1 ;
14071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14073: --
14074: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14075: --
14068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPT_unique.information1 ;
14071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14073: --
14074: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14075: --
14076: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPT_unique.information1 ;
14071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14073: --
14074: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14075: --
14076: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14077: --
14078: -- log_data('EPT',l_new_value,l_prefix || r_EPT_unique.name|| l_suffix,'REUSED');
14072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14073: --
14074: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14075: --
14076: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14077: --
14078: -- log_data('EPT',l_new_value,l_prefix || r_EPT_unique.name|| l_suffix,'REUSED');
14079: --
14080: end if ;
14093: open c_EPT_min_max_dates(r_EPT_unique.table_route_id, r_EPT_unique.information1 ) ;
14094: fetch c_EPT_min_max_dates into l_min_esd,l_max_eed ;
14095: --
14096:
14097: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14098: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14099: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14100: end if;
14101: l_min_esd := greatest(l_min_esd,r_EPT_unique.information2);
14094: fetch c_EPT_min_max_dates into l_min_esd,l_max_eed ;
14095: --
14096:
14097: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14098: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14099: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14100: end if;
14101: l_min_esd := greatest(l_min_esd,r_EPT_unique.information2);
14102: /**********************moved up from here **********************
14095: --
14096:
14097: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14098: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14099: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14100: end if;
14101: l_min_esd := greatest(l_min_esd,r_EPT_unique.information2);
14102: /**********************moved up from here **********************
14103: open c_EPT(r_EPT_unique.table_route_id,
14110: close c_EPT ;
14111: --
14112: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EPT.INFORMATION263,l_dml_operation);
14113:
14114: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
14115: l_PERSON_TYPE_ID := r_EPT.information176;
14116: else
14117: l_PERSON_TYPE_ID := r_EPT.information174;
14118: end if;
14149: p_from_date => l_min_esd,
14150: p_to_date => l_max_eed );
14151: if l_dt_rec_found THEN
14152: --END TEMPIK
14153: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14154: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14150: p_to_date => l_max_eed );
14151: if l_dt_rec_found THEN
14152: --END TEMPIK
14153: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14154: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14151: if l_dt_rec_found THEN
14152: --END TEMPIK
14153: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14154: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14152: --END TEMPIK
14153: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14154: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14160: --
14153: if r_EPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14154: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14160: --
14161: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14154: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PER_TYP_PRTE_ID' then
14155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14160: --
14161: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14162: --
14155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT_unique.information1 ;
14157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14160: --
14161: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14162: --
14163: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14160: --
14161: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14162: --
14163: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14164: end if ;
14165: --
14159: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14160: --
14161: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14162: --
14163: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14164: end if ;
14165: --
14166: l_object_found_in_target := true ;
14167: --TEMPIK
14196: end if ;
14197: --
14198:
14199: l_effective_date := r_EPT.information2;
14200: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14201: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14202: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14203: end if;
14204:
14197: --
14198:
14199: l_effective_date := r_EPT.information2;
14200: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14201: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14202: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14203: end if;
14204:
14205: if l_first_rec and not l_update then
14198:
14199: l_effective_date := r_EPT.information2;
14200: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14201: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14202: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14203: end if;
14204:
14205: if l_first_rec and not l_update then
14206: -- Call Create routine.
14262: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
14263: -- Update all relevent cer records with new pk_id
14264: hr_utility.set_location('Before plsql table ',222);
14265: hr_utility.set_location('new_value id '||l_elig_per_typ_prte_id,222);
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT.information1 ;
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PER_TYP_PRTE_ID ;
14269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14263: -- Update all relevent cer records with new pk_id
14264: hr_utility.set_location('Before plsql table ',222);
14265: hr_utility.set_location('new_value id '||l_elig_per_typ_prte_id,222);
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT.information1 ;
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PER_TYP_PRTE_ID ;
14269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14271: hr_utility.set_location('After plsql table ',222);
14264: hr_utility.set_location('Before plsql table ',222);
14265: hr_utility.set_location('new_value id '||l_elig_per_typ_prte_id,222);
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT.information1 ;
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PER_TYP_PRTE_ID ;
14269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14271: hr_utility.set_location('After plsql table ',222);
14272: --
14265: hr_utility.set_location('new_value id '||l_elig_per_typ_prte_id,222);
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT.information1 ;
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PER_TYP_PRTE_ID ;
14269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14271: hr_utility.set_location('After plsql table ',222);
14272: --
14273: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PER_TYP_PRTE_ID' ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPT.information1 ;
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PER_TYP_PRTE_ID ;
14269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14271: hr_utility.set_location('After plsql table ',222);
14272: --
14273: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14274: --
14269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPT_unique.table_route_id;
14271: hr_utility.set_location('After plsql table ',222);
14272: --
14273: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14274: --
14275: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14276: --
14277: else
14271: hr_utility.set_location('After plsql table ',222);
14272: --
14273: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14274: --
14275: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14276: --
14277: else
14278: --
14279: -- Call Update routine for the pk_id created in prev run .
14395: end loop;
14396: --
14397: exception when others then
14398: --
14399: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPT',r_EPT.information5 ) ;
14400: --
14401: end create_EPT_rows;
14402:
14403:
14540: end if ;
14541: -- End Prefix Sufix derivation
14542: for r_EPG_unique in c_unique_EPG('EPG') loop
14543:
14544: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14545: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14546: r_EPG_unique.information3 >=
14547: ben_pd_copy_to_ben_one.g_copy_effective_date)
14548: ) then
14541: -- End Prefix Sufix derivation
14542: for r_EPG_unique in c_unique_EPG('EPG') loop
14543:
14544: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14545: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14546: r_EPG_unique.information3 >=
14547: ben_pd_copy_to_ben_one.g_copy_effective_date)
14548: ) then
14549: --
14543:
14544: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14545: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14546: r_EPG_unique.information3 >=
14547: ben_pd_copy_to_ben_one.g_copy_effective_date)
14548: ) then
14549: --
14550: hr_utility.set_location(' r_EPG_unique.table_route_id '||r_EPG_unique.table_route_id,10);
14551: hr_utility.set_location(' r_EPG_unique.information1 '||r_EPG_unique.information1,10);
14586: l_object_found_in_target := TRUE;
14587: --
14588: if l_process_date between r_EPG_unique.information2 and r_EPG_unique.information3 then
14589: l_update := true;
14590: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14591: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPG_unique.information1 ;
14587: --
14588: if l_process_date between r_EPG_unique.information2 and r_EPG_unique.information3 then
14589: l_update := true;
14590: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14591: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPG_unique.information1 ;
14595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14588: if l_process_date between r_EPG_unique.information2 and r_EPG_unique.information3 then
14589: l_update := true;
14590: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14591: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPG_unique.information1 ;
14595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14589: l_update := true;
14590: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14591: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPG_unique.information1 ;
14595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14597: --
14590: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14591: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPG_unique.information1 ;
14595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14597: --
14598: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14591: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPG_unique.information1 ;
14595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14597: --
14598: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14599: --
14592: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14593: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPG_unique.information1 ;
14595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14597: --
14598: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14599: --
14600: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14594: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPG_unique.information1 ;
14595: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14597: --
14598: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14599: --
14600: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14601: --
14602: -- log_data('EPG',l_new_value,l_prefix || r_EPG_unique.name|| l_suffix,'REUSED');
14596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14597: --
14598: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14599: --
14600: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14601: --
14602: -- log_data('EPG',l_new_value,l_prefix || r_EPG_unique.name|| l_suffix,'REUSED');
14603: --
14604: end if ;
14617: open c_EPG_min_max_dates(r_EPG_unique.table_route_id, r_EPG_unique.information1 ) ;
14618: fetch c_EPG_min_max_dates into l_min_esd,l_max_eed ;
14619: --
14620:
14621: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14622: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14623: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14624: end if;
14625: l_min_esd := greatest(l_min_esd,r_EPG_unique.information2);
14618: fetch c_EPG_min_max_dates into l_min_esd,l_max_eed ;
14619: --
14620:
14621: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14622: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14623: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14624: end if;
14625: l_min_esd := greatest(l_min_esd,r_EPG_unique.information2);
14626: /**********************moved up from here **********************
14619: --
14620:
14621: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14622: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14623: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14624: end if;
14625: l_min_esd := greatest(l_min_esd,r_EPG_unique.information2);
14626: /**********************moved up from here **********************
14627: open c_EPG(r_EPG_unique.table_route_id,
14659: p_from_date => l_min_esd,
14660: p_to_date => l_max_eed );
14661: if l_dt_rec_found THEN
14662: --END TEMPIK
14663: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14660: p_to_date => l_max_eed );
14661: if l_dt_rec_found THEN
14662: --END TEMPIK
14663: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14661: if l_dt_rec_found THEN
14662: --END TEMPIK
14663: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14662: --END TEMPIK
14663: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14670: --
14663: if r_EPG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14670: --
14671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PPL_GRP_PRTE_ID' then
14665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14670: --
14671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14672: --
14665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG_unique.information1 ;
14667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14670: --
14671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14672: --
14673: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14670: --
14671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14672: --
14673: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14674: end if ;
14675: --
14669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14670: --
14671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14672: --
14673: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14674: end if ;
14675: --
14676: l_object_found_in_target := true ;
14677: --TEMPIK
14705: end if ;
14706: --
14707:
14708: l_effective_date := r_EPG.information2;
14709: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14710: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14711: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14712: end if;
14713:
14706: --
14707:
14708: l_effective_date := r_EPG.information2;
14709: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14710: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14711: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14712: end if;
14713:
14714: if l_first_rec and not l_update then
14707:
14708: l_effective_date := r_EPG.information2;
14709: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14710: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14711: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14712: end if;
14713:
14714: if l_first_rec and not l_update then
14715: -- Call Create routine.
14770: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
14771: -- Update all relevent cer records with new pk_id
14772: hr_utility.set_location('Before plsql table ',222);
14773: hr_utility.set_location('new_value id '||l_elig_ppl_grp_prte_id,222);
14774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG.information1 ;
14776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PPL_GRP_PRTE_ID ;
14777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14771: -- Update all relevent cer records with new pk_id
14772: hr_utility.set_location('Before plsql table ',222);
14773: hr_utility.set_location('new_value id '||l_elig_ppl_grp_prte_id,222);
14774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG.information1 ;
14776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PPL_GRP_PRTE_ID ;
14777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14779: hr_utility.set_location('After plsql table ',222);
14772: hr_utility.set_location('Before plsql table ',222);
14773: hr_utility.set_location('new_value id '||l_elig_ppl_grp_prte_id,222);
14774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG.information1 ;
14776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PPL_GRP_PRTE_ID ;
14777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14779: hr_utility.set_location('After plsql table ',222);
14780: --
14773: hr_utility.set_location('new_value id '||l_elig_ppl_grp_prte_id,222);
14774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG.information1 ;
14776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PPL_GRP_PRTE_ID ;
14777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14779: hr_utility.set_location('After plsql table ',222);
14780: --
14781: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PPL_GRP_PRTE_ID' ;
14775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPG.information1 ;
14776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PPL_GRP_PRTE_ID ;
14777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14779: hr_utility.set_location('After plsql table ',222);
14780: --
14781: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14782: --
14777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPG_unique.table_route_id;
14779: hr_utility.set_location('After plsql table ',222);
14780: --
14781: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14782: --
14783: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14784: --
14785: else
14779: hr_utility.set_location('After plsql table ',222);
14780: --
14781: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14782: --
14783: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14784: --
14785: else
14786: --
14787: -- Call Update routine for the pk_id created in prev run .
14900: end loop;
14901: --
14902: exception when others then
14903: --
14904: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPG',r_EPG.information5 ) ;
14905: --
14906: end create_EPG_rows;
14907:
14908: --
15043: end if ;
15044: -- End Prefix Sufix derivation
15045: for r_EPB_unique in c_unique_EPB('EPB') loop
15046:
15047: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15048: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15049: r_EPB_unique.information3 >=
15050: ben_pd_copy_to_ben_one.g_copy_effective_date)
15051: ) then
15044: -- End Prefix Sufix derivation
15045: for r_EPB_unique in c_unique_EPB('EPB') loop
15046:
15047: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15048: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15049: r_EPB_unique.information3 >=
15050: ben_pd_copy_to_ben_one.g_copy_effective_date)
15051: ) then
15052: --
15046:
15047: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15048: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15049: r_EPB_unique.information3 >=
15050: ben_pd_copy_to_ben_one.g_copy_effective_date)
15051: ) then
15052: --
15053: hr_utility.set_location(' r_EPB_unique.table_route_id '||r_EPB_unique.table_route_id,10);
15054: hr_utility.set_location(' r_EPB_unique.information1 '||r_EPB_unique.information1,10);
15074: --
15075: close c_EPB ;
15076: --
15077: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EPB.INFORMATION263,l_dml_operation);
15078: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
15079: l_PAY_BASIS_ID := r_EPB.information176;
15080: else
15081: l_PAY_BASIS_ID := r_EPB.information174;
15082: end if;
15087: l_object_found_in_target := TRUE;
15088: --
15089: if l_process_date between r_EPB_unique.information2 and r_EPB_unique.information3 then
15090: l_update := true;
15091: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPB_unique.information1 ;
15088: --
15089: if l_process_date between r_EPB_unique.information2 and r_EPB_unique.information3 then
15090: l_update := true;
15091: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPB_unique.information1 ;
15096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15089: if l_process_date between r_EPB_unique.information2 and r_EPB_unique.information3 then
15090: l_update := true;
15091: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPB_unique.information1 ;
15096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15090: l_update := true;
15091: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPB_unique.information1 ;
15096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15098: --
15091: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPB_unique.information1 ;
15096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15098: --
15099: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15092: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPB_unique.information1 ;
15096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15098: --
15099: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15100: --
15093: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPB_unique.information1 ;
15096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15098: --
15099: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15100: --
15101: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPB_unique.information1 ;
15096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15098: --
15099: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15100: --
15101: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15102: --
15103: -- log_data('EPB',l_new_value,l_prefix || r_EPB_unique.name|| l_suffix,'REUSED');
15097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15098: --
15099: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15100: --
15101: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15102: --
15103: -- log_data('EPB',l_new_value,l_prefix || r_EPB_unique.name|| l_suffix,'REUSED');
15104: --
15105: end if ;
15118: open c_EPB_min_max_dates(r_EPB_unique.table_route_id, r_EPB_unique.information1 ) ;
15119: fetch c_EPB_min_max_dates into l_min_esd,l_max_eed ;
15120: --
15121:
15122: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15123: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15124: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15125: end if;
15126: l_min_esd := greatest(l_min_esd,r_EPB_unique.information2);
15119: fetch c_EPB_min_max_dates into l_min_esd,l_max_eed ;
15120: --
15121:
15122: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15123: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15124: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15125: end if;
15126: l_min_esd := greatest(l_min_esd,r_EPB_unique.information2);
15127: /**********************moved up from here **********************
15120: --
15121:
15122: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15123: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15124: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15125: end if;
15126: l_min_esd := greatest(l_min_esd,r_EPB_unique.information2);
15127: /**********************moved up from here **********************
15128: open c_EPB(r_EPB_unique.table_route_id,
15134: --
15135: close c_EPB ;
15136: --
15137: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EPB.INFORMATION263,l_dml_operation);
15138: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
15139: l_PAY_BASIS_ID := r_EPB.information176;
15140: else
15141: l_PAY_BASIS_ID := r_EPB.information174;
15142: end if;
15170: p_from_date => l_min_esd,
15171: p_to_date => l_max_eed );
15172: if l_dt_rec_found THEN
15173: --END TEMPIK
15174: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15175: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15171: p_to_date => l_max_eed );
15172: if l_dt_rec_found THEN
15173: --END TEMPIK
15174: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15175: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15172: if l_dt_rec_found THEN
15173: --END TEMPIK
15174: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15175: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15173: --END TEMPIK
15174: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15175: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15181: --
15174: if r_EPB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15175: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15181: --
15182: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15175: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PY_BSS_PRTE_ID' then
15176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15181: --
15182: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15183: --
15176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB_unique.information1 ;
15178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15181: --
15182: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15183: --
15184: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15181: --
15182: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15183: --
15184: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15185: end if ;
15186: --
15180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15181: --
15182: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15183: --
15184: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15185: end if ;
15186: --
15187: l_object_found_in_target := true ;
15188: --TEMPIK
15217: end if ;
15218: --
15219:
15220: l_effective_date := r_EPB.information2;
15221: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15222: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15223: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15224: end if;
15225:
15218: --
15219:
15220: l_effective_date := r_EPB.information2;
15221: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15222: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15223: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15224: end if;
15225:
15226: if l_first_rec and not l_update then
15219:
15220: l_effective_date := r_EPB.information2;
15221: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15222: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15223: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15224: end if;
15225:
15226: if l_first_rec and not l_update then
15227: -- Call Create routine.
15282: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
15283: -- Update all relevent cer records with new pk_id
15284: hr_utility.set_location('Before plsql table ',222);
15285: hr_utility.set_location('new_value id '||l_elig_py_bss_prte_id,222);
15286: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15287: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB.information1 ;
15288: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PY_BSS_PRTE_ID ;
15289: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15290: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15283: -- Update all relevent cer records with new pk_id
15284: hr_utility.set_location('Before plsql table ',222);
15285: hr_utility.set_location('new_value id '||l_elig_py_bss_prte_id,222);
15286: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15287: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB.information1 ;
15288: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PY_BSS_PRTE_ID ;
15289: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15290: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15291: hr_utility.set_location('After plsql table ',222);
15284: hr_utility.set_location('Before plsql table ',222);
15285: hr_utility.set_location('new_value id '||l_elig_py_bss_prte_id,222);
15286: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15287: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB.information1 ;
15288: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PY_BSS_PRTE_ID ;
15289: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15290: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15291: hr_utility.set_location('After plsql table ',222);
15292: --
15285: hr_utility.set_location('new_value id '||l_elig_py_bss_prte_id,222);
15286: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15287: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB.information1 ;
15288: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PY_BSS_PRTE_ID ;
15289: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15290: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15291: hr_utility.set_location('After plsql table ',222);
15292: --
15293: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15286: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PY_BSS_PRTE_ID' ;
15287: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPB.information1 ;
15288: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PY_BSS_PRTE_ID ;
15289: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15290: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15291: hr_utility.set_location('After plsql table ',222);
15292: --
15293: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15294: --
15289: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15290: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPB_unique.table_route_id;
15291: hr_utility.set_location('After plsql table ',222);
15292: --
15293: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15294: --
15295: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15296: --
15297: else
15291: hr_utility.set_location('After plsql table ',222);
15292: --
15293: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15294: --
15295: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15296: --
15297: else
15298: --
15299: -- Call Update routine for the pk_id created in prev run .
15414: end loop;
15415: --
15416: exception when others then
15417: --
15418: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPB',r_EPB.information5 ) ;
15419: --
15420: end create_EPB_rows;
15421:
15422: --
15564: end if ;
15565: -- End Prefix Sufix derivation
15566: for r_EPN_unique in c_unique_EPN('EPN') loop
15567:
15568: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15569: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15570: r_EPN_unique.information3 >=
15571: ben_pd_copy_to_ben_one.g_copy_effective_date)
15572: ) then
15565: -- End Prefix Sufix derivation
15566: for r_EPN_unique in c_unique_EPN('EPN') loop
15567:
15568: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15569: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15570: r_EPN_unique.information3 >=
15571: ben_pd_copy_to_ben_one.g_copy_effective_date)
15572: ) then
15573: --
15567:
15568: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15569: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15570: r_EPN_unique.information3 >=
15571: ben_pd_copy_to_ben_one.g_copy_effective_date)
15572: ) then
15573: --
15574: hr_utility.set_location(' r_EPN_unique.table_route_id '||r_EPN_unique.table_route_id,10);
15575: hr_utility.set_location(' r_EPN_unique.information1 '||r_EPN_unique.information1,10);
15607: l_object_found_in_target := TRUE;
15608: --
15609: if l_process_date between r_EPN_unique.information2 and r_EPN_unique.information3 then
15610: l_update := true;
15611: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPN_unique.information1 ;
15608: --
15609: if l_process_date between r_EPN_unique.information2 and r_EPN_unique.information3 then
15610: l_update := true;
15611: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPN_unique.information1 ;
15616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15609: if l_process_date between r_EPN_unique.information2 and r_EPN_unique.information3 then
15610: l_update := true;
15611: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPN_unique.information1 ;
15616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15610: l_update := true;
15611: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPN_unique.information1 ;
15616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15618: --
15611: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPN_unique.information1 ;
15616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15618: --
15619: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPN_unique.information1 ;
15616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15618: --
15619: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15620: --
15613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPN_unique.information1 ;
15616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15618: --
15619: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15620: --
15621: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPN_unique.information1 ;
15616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15618: --
15619: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15620: --
15621: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15622: --
15623: -- log_data('EPN',l_new_value,l_prefix || r_EPN_unique.name|| l_suffix,'REUSED');
15617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15618: --
15619: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15620: --
15621: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15622: --
15623: -- log_data('EPN',l_new_value,l_prefix || r_EPN_unique.name|| l_suffix,'REUSED');
15624: --
15625: end if ;
15638: open c_EPN_min_max_dates(r_EPN_unique.table_route_id, r_EPN_unique.information1 ) ;
15639: fetch c_EPN_min_max_dates into l_min_esd,l_max_eed ;
15640: --
15641:
15642: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15643: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15644: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15645: end if;
15646: l_min_esd := greatest(l_min_esd,r_EPN_unique.information2);
15639: fetch c_EPN_min_max_dates into l_min_esd,l_max_eed ;
15640: --
15641:
15642: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15643: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15644: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15645: end if;
15646: l_min_esd := greatest(l_min_esd,r_EPN_unique.information2);
15647: /**********************moved up from here **********************
15640: --
15641:
15642: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15643: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15644: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15645: end if;
15646: l_min_esd := greatest(l_min_esd,r_EPN_unique.information2);
15647: /**********************moved up from here **********************
15648: open c_EPN(r_EPN_unique.table_route_id,
15678: p_from_date => l_min_esd,
15679: p_to_date => l_max_eed );
15680: if l_dt_rec_found THEN
15681: --END TEMPIK
15682: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15683: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15679: p_to_date => l_max_eed );
15680: if l_dt_rec_found THEN
15681: --END TEMPIK
15682: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15683: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15680: if l_dt_rec_found THEN
15681: --END TEMPIK
15682: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15683: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15681: --END TEMPIK
15682: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15683: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15689: --
15682: if r_EPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15683: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15689: --
15690: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15683: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRBTN_PERD_PRTE_ID' then
15684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15689: --
15690: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15691: --
15684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN_unique.information1 ;
15686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15689: --
15690: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15691: --
15692: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15689: --
15690: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15691: --
15692: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15693: end if ;
15694: --
15688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15689: --
15690: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15691: --
15692: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15693: end if ;
15694: --
15695: l_object_found_in_target := true ;
15696: --TEMPIK
15724: end if ;
15725: --
15726:
15727: l_effective_date := r_EPN.information2;
15728: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15729: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15730: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15731: end if;
15732:
15725: --
15726:
15727: l_effective_date := r_EPN.information2;
15728: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15729: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15730: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15731: end if;
15732:
15733: if l_first_rec and not l_update then
15726:
15727: l_effective_date := r_EPN.information2;
15728: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15729: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15730: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15731: end if;
15732:
15733: if l_first_rec and not l_update then
15734: -- Call Create routine.
15790: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
15791: -- Update all relevent cer records with new pk_id
15792: hr_utility.set_location('Before plsql table ',222);
15793: hr_utility.set_location('new_value id '||l_elig_prbtn_perd_prte_id,222);
15794: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN.information1 ;
15796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRBTN_PERD_PRTE_ID ;
15797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15791: -- Update all relevent cer records with new pk_id
15792: hr_utility.set_location('Before plsql table ',222);
15793: hr_utility.set_location('new_value id '||l_elig_prbtn_perd_prte_id,222);
15794: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN.information1 ;
15796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRBTN_PERD_PRTE_ID ;
15797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15799: hr_utility.set_location('After plsql table ',222);
15792: hr_utility.set_location('Before plsql table ',222);
15793: hr_utility.set_location('new_value id '||l_elig_prbtn_perd_prte_id,222);
15794: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN.information1 ;
15796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRBTN_PERD_PRTE_ID ;
15797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15799: hr_utility.set_location('After plsql table ',222);
15800: --
15793: hr_utility.set_location('new_value id '||l_elig_prbtn_perd_prte_id,222);
15794: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN.information1 ;
15796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRBTN_PERD_PRTE_ID ;
15797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15799: hr_utility.set_location('After plsql table ',222);
15800: --
15801: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15794: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRBTN_PERD_PRTE_ID' ;
15795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPN.information1 ;
15796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRBTN_PERD_PRTE_ID ;
15797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15799: hr_utility.set_location('After plsql table ',222);
15800: --
15801: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15802: --
15797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPN_unique.table_route_id;
15799: hr_utility.set_location('After plsql table ',222);
15800: --
15801: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15802: --
15803: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15804: --
15805: else
15799: hr_utility.set_location('After plsql table ',222);
15800: --
15801: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15802: --
15803: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15804: --
15805: else
15806: --
15807: -- Call Update routine for the pk_id created in prev run .
15921: end loop;
15922: --
15923: exception when others then
15924: --
15925: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPN',r_EPN.information5 ) ;
15926: --
15927: end create_EPN_rows;
15928:
15929: --
16065: end if ;
16066: -- End Prefix Sufix derivation
16067: for r_EPP_unique in c_unique_EPP('EPP') loop
16068:
16069: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16070: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16071: r_EPP_unique.information3 >=
16072: ben_pd_copy_to_ben_one.g_copy_effective_date)
16073: ) then
16066: -- End Prefix Sufix derivation
16067: for r_EPP_unique in c_unique_EPP('EPP') loop
16068:
16069: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16070: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16071: r_EPP_unique.information3 >=
16072: ben_pd_copy_to_ben_one.g_copy_effective_date)
16073: ) then
16074: --
16068:
16069: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16070: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16071: r_EPP_unique.information3 >=
16072: ben_pd_copy_to_ben_one.g_copy_effective_date)
16073: ) then
16074: --
16075: hr_utility.set_location(' r_EPP_unique.table_route_id '||r_EPP_unique.table_route_id,10);
16076: hr_utility.set_location(' r_EPP_unique.information1 '||r_EPP_unique.information1,10);
16111: l_object_found_in_target := TRUE;
16112: --
16113: if l_process_date between r_EPP_unique.information2 and r_EPP_unique.information3 then
16114: l_update := true;
16115: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16116: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPP_unique.information1 ;
16112: --
16113: if l_process_date between r_EPP_unique.information2 and r_EPP_unique.information3 then
16114: l_update := true;
16115: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16116: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPP_unique.information1 ;
16120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16113: if l_process_date between r_EPP_unique.information2 and r_EPP_unique.information3 then
16114: l_update := true;
16115: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16116: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPP_unique.information1 ;
16120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16114: l_update := true;
16115: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16116: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPP_unique.information1 ;
16120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16122: --
16115: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16116: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPP_unique.information1 ;
16120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16122: --
16123: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16116: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPP_unique.information1 ;
16120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16122: --
16123: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16124: --
16117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPP_unique.information1 ;
16120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16122: --
16123: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16124: --
16125: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPP_unique.information1 ;
16120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16122: --
16123: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16124: --
16125: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16126: --
16127: -- log_data('EPP',l_new_value,l_prefix || r_EPP_unique.name|| l_suffix,'REUSED');
16121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16122: --
16123: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16124: --
16125: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16126: --
16127: -- log_data('EPP',l_new_value,l_prefix || r_EPP_unique.name|| l_suffix,'REUSED');
16128: --
16129: end if ;
16142: open c_EPP_min_max_dates(r_EPP_unique.table_route_id, r_EPP_unique.information1 ) ;
16143: fetch c_EPP_min_max_dates into l_min_esd,l_max_eed ;
16144: --
16145:
16146: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16147: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16148: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16149: end if;
16150: l_min_esd := greatest(l_min_esd,r_EPP_unique.information2);
16143: fetch c_EPP_min_max_dates into l_min_esd,l_max_eed ;
16144: --
16145:
16146: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16147: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16148: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16149: end if;
16150: l_min_esd := greatest(l_min_esd,r_EPP_unique.information2);
16151: /**********************moved up from here **********************
16144: --
16145:
16146: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16147: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16148: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16149: end if;
16150: l_min_esd := greatest(l_min_esd,r_EPP_unique.information2);
16151: /**********************moved up from here **********************
16152: open c_EPP(r_EPP_unique.table_route_id,
16184: p_from_date => l_min_esd,
16185: p_to_date => l_max_eed );
16186: if l_dt_rec_found THEN
16187: --END TEMPIK
16188: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16189: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16185: p_to_date => l_max_eed );
16186: if l_dt_rec_found THEN
16187: --END TEMPIK
16188: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16189: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16186: if l_dt_rec_found THEN
16187: --END TEMPIK
16188: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16189: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16187: --END TEMPIK
16188: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16189: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16195: --
16188: if r_EPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16189: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16195: --
16196: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16189: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PRTT_ANTHR_PL_PRTE_ID' then
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16195: --
16196: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16197: --
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP_unique.information1 ;
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16195: --
16196: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16197: --
16198: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16195: --
16196: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16197: --
16198: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16199: end if ;
16200: --
16194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16195: --
16196: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16197: --
16198: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16199: end if ;
16200: --
16201: l_object_found_in_target := true ;
16202: --TEMPIK
16230: end if ;
16231: --
16232:
16233: l_effective_date := r_EPP.information2;
16234: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16235: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16236: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16237: end if;
16238:
16231: --
16232:
16233: l_effective_date := r_EPP.information2;
16234: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16235: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16236: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16237: end if;
16238:
16239: if l_first_rec and not l_update then
16232:
16233: l_effective_date := r_EPP.information2;
16234: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16235: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16236: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16237: end if;
16238:
16239: if l_first_rec and not l_update then
16240: -- Call Create routine.
16289: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
16290: -- Update all relevent cer records with new pk_id
16291: hr_utility.set_location('Before plsql table ',222);
16292: hr_utility.set_location('new_value id '||l_elig_prtt_anthr_pl_prte_id,222);
16293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP.information1 ;
16295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRTT_ANTHR_PL_PRTE_ID ;
16296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16290: -- Update all relevent cer records with new pk_id
16291: hr_utility.set_location('Before plsql table ',222);
16292: hr_utility.set_location('new_value id '||l_elig_prtt_anthr_pl_prte_id,222);
16293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP.information1 ;
16295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRTT_ANTHR_PL_PRTE_ID ;
16296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16298: hr_utility.set_location('After plsql table ',222);
16291: hr_utility.set_location('Before plsql table ',222);
16292: hr_utility.set_location('new_value id '||l_elig_prtt_anthr_pl_prte_id,222);
16293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP.information1 ;
16295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRTT_ANTHR_PL_PRTE_ID ;
16296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16298: hr_utility.set_location('After plsql table ',222);
16299: --
16292: hr_utility.set_location('new_value id '||l_elig_prtt_anthr_pl_prte_id,222);
16293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP.information1 ;
16295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRTT_ANTHR_PL_PRTE_ID ;
16296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16298: hr_utility.set_location('After plsql table ',222);
16299: --
16300: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PRTT_ANTHR_PL_PRTE_ID' ;
16294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPP.information1 ;
16295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PRTT_ANTHR_PL_PRTE_ID ;
16296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16298: hr_utility.set_location('After plsql table ',222);
16299: --
16300: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16301: --
16296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPP_unique.table_route_id;
16298: hr_utility.set_location('After plsql table ',222);
16299: --
16300: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16301: --
16302: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16303: --
16304: else
16298: hr_utility.set_location('After plsql table ',222);
16299: --
16300: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16301: --
16302: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16303: --
16304: else
16305: --
16306: -- Call Update routine for the pk_id created in prev run .
16414: end loop;
16415: --
16416: exception when others then
16417: --
16418: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPP',r_EPP.information5 ) ;
16419: --
16420: end create_EPP_rows;
16421:
16422: --
16555: end if ;
16556: -- End Prefix Sufix derivation
16557: for r_EPS_unique in c_unique_EPS('EPS') loop
16558:
16559: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16560: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16561: r_EPS_unique.information3 >=
16562: ben_pd_copy_to_ben_one.g_copy_effective_date)
16563: ) then
16556: -- End Prefix Sufix derivation
16557: for r_EPS_unique in c_unique_EPS('EPS') loop
16558:
16559: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16560: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16561: r_EPS_unique.information3 >=
16562: ben_pd_copy_to_ben_one.g_copy_effective_date)
16563: ) then
16564: --
16558:
16559: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16560: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16561: r_EPS_unique.information3 >=
16562: ben_pd_copy_to_ben_one.g_copy_effective_date)
16563: ) then
16564: --
16565: hr_utility.set_location(' r_EPS_unique.table_route_id '||r_EPS_unique.table_route_id,10);
16566: hr_utility.set_location(' r_EPS_unique.information1 '||r_EPS_unique.information1,10);
16586: --
16587: close c_EPS ;
16588: --
16589: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EPS.INFORMATION263,l_dml_operation);
16590: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
16591: l_POSITION_ID := r_EPS.information176;
16592: else
16593: l_POSITION_ID := r_EPS.information174;
16594: end if;
16600: l_object_found_in_target := TRUE;
16601: --
16602: if l_process_date between r_EPS_unique.information2 and r_EPS_unique.information3 then
16603: l_update := true;
16604: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16605: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPS_unique.information1 ;
16601: --
16602: if l_process_date between r_EPS_unique.information2 and r_EPS_unique.information3 then
16603: l_update := true;
16604: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16605: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPS_unique.information1 ;
16609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16602: if l_process_date between r_EPS_unique.information2 and r_EPS_unique.information3 then
16603: l_update := true;
16604: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16605: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPS_unique.information1 ;
16609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16603: l_update := true;
16604: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16605: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPS_unique.information1 ;
16609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16611: --
16604: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16605: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPS_unique.information1 ;
16609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16611: --
16612: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16605: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPS_unique.information1 ;
16609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16611: --
16612: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16613: --
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPS_unique.information1 ;
16609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16611: --
16612: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16613: --
16614: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPS_unique.information1 ;
16609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16611: --
16612: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16613: --
16614: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16615: --
16616: -- log_data('EPS',l_new_value,l_prefix || r_EPS_unique.name|| l_suffix,'REUSED');
16610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16611: --
16612: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16613: --
16614: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16615: --
16616: -- log_data('EPS',l_new_value,l_prefix || r_EPS_unique.name|| l_suffix,'REUSED');
16617: --
16618: end if ;
16631: open c_EPS_min_max_dates(r_EPS_unique.table_route_id, r_EPS_unique.information1 ) ;
16632: fetch c_EPS_min_max_dates into l_min_esd,l_max_eed ;
16633: --
16634:
16635: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16636: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16637: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16638: end if;
16639: l_min_esd := greatest(l_min_esd,r_EPS_unique.information2);
16632: fetch c_EPS_min_max_dates into l_min_esd,l_max_eed ;
16633: --
16634:
16635: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16636: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16637: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16638: end if;
16639: l_min_esd := greatest(l_min_esd,r_EPS_unique.information2);
16640: /**********************moved up from here **********************
16633: --
16634:
16635: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16636: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16637: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16638: end if;
16639: l_min_esd := greatest(l_min_esd,r_EPS_unique.information2);
16640: /**********************moved up from here **********************
16641: open c_EPS(r_EPS_unique.table_route_id,
16647: --
16648: close c_EPS ;
16649: --
16650: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EPS.INFORMATION263,l_dml_operation);
16651: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
16652: l_POSITION_ID := r_EPS.information176;
16653: else
16654: l_POSITION_ID := r_EPS.information174;
16655: end if;
16684: p_from_date => l_min_esd,
16685: p_to_date => l_max_eed );
16686: if l_dt_rec_found THEN
16687: --END TEMPIK
16688: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16689: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16690: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16691: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16692: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16685: p_to_date => l_max_eed );
16686: if l_dt_rec_found THEN
16687: --END TEMPIK
16688: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16689: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16690: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16691: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16692: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16693: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16686: if l_dt_rec_found THEN
16687: --END TEMPIK
16688: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16689: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16690: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16691: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16692: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16693: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16694: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16687: --END TEMPIK
16688: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16689: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16690: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16691: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16692: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16693: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16694: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16695: --
16688: if r_EPS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16689: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16690: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16691: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16692: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16693: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16694: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16695: --
16696: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16689: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTN_PRTE_ID' then
16690: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16691: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16692: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16693: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16694: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16695: --
16696: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16697: --
16690: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16691: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS_unique.information1 ;
16692: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16693: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16694: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16695: --
16696: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16697: --
16698: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16692: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16693: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16694: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16695: --
16696: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16697: --
16698: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16699: end if ;
16700: --
16694: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16695: --
16696: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16697: --
16698: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16699: end if ;
16700: --
16701: l_object_found_in_target := true ;
16702: --TEMPIK
16733: end if ;
16734: --
16735:
16736: l_effective_date := r_EPS.information2;
16737: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16738: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16739: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16740: end if;
16741:
16734: --
16735:
16736: l_effective_date := r_EPS.information2;
16737: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16738: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16739: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16740: end if;
16741:
16742: if l_first_rec and not l_update then
16735:
16736: l_effective_date := r_EPS.information2;
16737: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16738: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16739: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16740: end if;
16741:
16742: if l_first_rec and not l_update then
16743: -- Call Create routine.
16798: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
16799: -- Update all relevent cer records with new pk_id
16800: hr_utility.set_location('Before plsql table ',222);
16801: hr_utility.set_location('new_value id '||l_elig_pstn_prte_id,222);
16802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS.information1 ;
16804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTN_PRTE_ID ;
16805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16799: -- Update all relevent cer records with new pk_id
16800: hr_utility.set_location('Before plsql table ',222);
16801: hr_utility.set_location('new_value id '||l_elig_pstn_prte_id,222);
16802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS.information1 ;
16804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTN_PRTE_ID ;
16805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16807: hr_utility.set_location('After plsql table ',222);
16800: hr_utility.set_location('Before plsql table ',222);
16801: hr_utility.set_location('new_value id '||l_elig_pstn_prte_id,222);
16802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS.information1 ;
16804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTN_PRTE_ID ;
16805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16807: hr_utility.set_location('After plsql table ',222);
16808: --
16801: hr_utility.set_location('new_value id '||l_elig_pstn_prte_id,222);
16802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS.information1 ;
16804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTN_PRTE_ID ;
16805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16807: hr_utility.set_location('After plsql table ',222);
16808: --
16809: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTN_PRTE_ID' ;
16803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPS.information1 ;
16804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTN_PRTE_ID ;
16805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16807: hr_utility.set_location('After plsql table ',222);
16808: --
16809: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16810: --
16805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPS_unique.table_route_id;
16807: hr_utility.set_location('After plsql table ',222);
16808: --
16809: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16810: --
16811: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16812: --
16813: else
16807: hr_utility.set_location('After plsql table ',222);
16808: --
16809: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16810: --
16811: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16812: --
16813: else
16814: --
16815: -- Call Update routine for the pk_id created in prev run .
16930: end loop;
16931: --
16932: exception when others then
16933: --
16934: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPS',r_EPS.information5 ) ;
16935: --
16936: end create_EPS_rows;
16937:
16938: --
17071: end if ;
17072: -- End Prefix Sufix derivation
17073: for r_EPY_unique in c_unique_EPY('EPY') loop
17074:
17075: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17076: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17077: r_EPY_unique.information3 >=
17078: ben_pd_copy_to_ben_one.g_copy_effective_date)
17079: ) then
17072: -- End Prefix Sufix derivation
17073: for r_EPY_unique in c_unique_EPY('EPY') loop
17074:
17075: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17076: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17077: r_EPY_unique.information3 >=
17078: ben_pd_copy_to_ben_one.g_copy_effective_date)
17079: ) then
17080: --
17074:
17075: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17076: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17077: r_EPY_unique.information3 >=
17078: ben_pd_copy_to_ben_one.g_copy_effective_date)
17079: ) then
17080: --
17081: hr_utility.set_location(' r_EPY_unique.table_route_id '||r_EPY_unique.table_route_id,10);
17082: hr_utility.set_location(' r_EPY_unique.information1 '||r_EPY_unique.information1,10);
17102: --
17103: close c_EPY ;
17104: --
17105: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EPY.INFORMATION263,l_dml_operation);
17106: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
17107: l_PAYROLL_ID := r_EPY.information176;
17108: else
17109: l_PAYROLL_ID := r_EPY.information174;
17110: end if;
17116: l_object_found_in_target := TRUE;
17117: --
17118: if l_process_date between r_EPY_unique.information2 and r_EPY_unique.information3 then
17119: l_update := true;
17120: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17121: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17124: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPY_unique.information1 ;
17117: --
17118: if l_process_date between r_EPY_unique.information2 and r_EPY_unique.information3 then
17119: l_update := true;
17120: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17121: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17124: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPY_unique.information1 ;
17125: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17118: if l_process_date between r_EPY_unique.information2 and r_EPY_unique.information3 then
17119: l_update := true;
17120: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17121: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17124: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPY_unique.information1 ;
17125: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17126: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17119: l_update := true;
17120: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17121: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17124: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPY_unique.information1 ;
17125: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17126: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17127: --
17120: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17121: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17124: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPY_unique.information1 ;
17125: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17126: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17127: --
17128: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17121: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17124: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPY_unique.information1 ;
17125: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17126: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17127: --
17128: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17129: --
17122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17124: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPY_unique.information1 ;
17125: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17126: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17127: --
17128: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17129: --
17130: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17124: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPY_unique.information1 ;
17125: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17126: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17127: --
17128: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17129: --
17130: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17131: --
17132: -- log_data('EPY',l_new_value,l_prefix || r_EPY_unique.name|| l_suffix,'REUSED');
17126: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17127: --
17128: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17129: --
17130: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17131: --
17132: -- log_data('EPY',l_new_value,l_prefix || r_EPY_unique.name|| l_suffix,'REUSED');
17133: --
17134: end if ;
17147: open c_EPY_min_max_dates(r_EPY_unique.table_route_id, r_EPY_unique.information1 ) ;
17148: fetch c_EPY_min_max_dates into l_min_esd,l_max_eed ;
17149: --
17150:
17151: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17152: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17153: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17154: end if;
17155: l_min_esd := greatest(l_min_esd,r_EPY_unique.information2);
17148: fetch c_EPY_min_max_dates into l_min_esd,l_max_eed ;
17149: --
17150:
17151: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17152: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17153: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17154: end if;
17155: l_min_esd := greatest(l_min_esd,r_EPY_unique.information2);
17156: /**********************moved up from here **********************
17149: --
17150:
17151: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17152: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17153: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17154: end if;
17155: l_min_esd := greatest(l_min_esd,r_EPY_unique.information2);
17156: /**********************moved up from here **********************
17157: open c_EPY(r_EPY_unique.table_route_id,
17163: --
17164: close c_EPY ;
17165: --
17166: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EPY.INFORMATION263,l_dml_operation);
17167: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
17168: l_PAYROLL_ID := r_EPY.information176;
17169: else
17170: l_PAYROLL_ID := r_EPY.information174;
17171: end if;
17200: p_from_date => l_min_esd,
17201: p_to_date => l_max_eed );
17202: if l_dt_rec_found THEN
17203: --END TEMPIK
17204: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17205: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17201: p_to_date => l_max_eed );
17202: if l_dt_rec_found THEN
17203: --END TEMPIK
17204: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17205: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17202: if l_dt_rec_found THEN
17203: --END TEMPIK
17204: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17205: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17203: --END TEMPIK
17204: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17205: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17211: --
17204: if r_EPY_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17205: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17211: --
17212: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17205: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PYRL_PRTE_ID' then
17206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17211: --
17212: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17213: --
17206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY_unique.information1 ;
17208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17211: --
17212: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17213: --
17214: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17211: --
17212: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17213: --
17214: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17215: end if ;
17216: --
17210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17211: --
17212: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17213: --
17214: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17215: end if ;
17216: --
17217: l_object_found_in_target := true ;
17218: --TEMPIK
17246: end if ;
17247: --
17248:
17249: l_effective_date := r_EPY.information2;
17250: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17251: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17252: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17253: end if;
17254:
17247: --
17248:
17249: l_effective_date := r_EPY.information2;
17250: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17251: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17252: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17253: end if;
17254:
17255: if l_first_rec and not l_update then
17248:
17249: l_effective_date := r_EPY.information2;
17250: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17251: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17252: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17253: end if;
17254:
17255: if l_first_rec and not l_update then
17256: -- Call Create routine.
17311: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
17312: -- Update all relevent cer records with new pk_id
17313: hr_utility.set_location('Before plsql table ',222);
17314: hr_utility.set_location('new_value id '||l_elig_pyrl_prte_id,222);
17315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY.information1 ;
17317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PYRL_PRTE_ID ;
17318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17312: -- Update all relevent cer records with new pk_id
17313: hr_utility.set_location('Before plsql table ',222);
17314: hr_utility.set_location('new_value id '||l_elig_pyrl_prte_id,222);
17315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY.information1 ;
17317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PYRL_PRTE_ID ;
17318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17320: hr_utility.set_location('After plsql table ',222);
17313: hr_utility.set_location('Before plsql table ',222);
17314: hr_utility.set_location('new_value id '||l_elig_pyrl_prte_id,222);
17315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY.information1 ;
17317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PYRL_PRTE_ID ;
17318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17320: hr_utility.set_location('After plsql table ',222);
17321: --
17314: hr_utility.set_location('new_value id '||l_elig_pyrl_prte_id,222);
17315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY.information1 ;
17317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PYRL_PRTE_ID ;
17318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17320: hr_utility.set_location('After plsql table ',222);
17321: --
17322: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PYRL_PRTE_ID' ;
17316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPY.information1 ;
17317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PYRL_PRTE_ID ;
17318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17320: hr_utility.set_location('After plsql table ',222);
17321: --
17322: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17323: --
17318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPY_unique.table_route_id;
17320: hr_utility.set_location('After plsql table ',222);
17321: --
17322: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17323: --
17324: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17325: --
17326: else
17320: hr_utility.set_location('After plsql table ',222);
17321: --
17322: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17323: --
17324: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17325: --
17326: else
17327: --
17328: -- Call Update routine for the pk_id created in prev run .
17443: end loop;
17444: --
17445: exception when others then
17446: --
17447: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPY',r_EPY.information5 ) ;
17448: --
17449: end create_EPY_rows;
17450:
17451: --
17584: end if ;
17585: -- End Prefix Sufix derivation
17586: for r_EPZ_unique in c_unique_EPZ('EPZ') loop
17587:
17588: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17589: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17590: r_EPZ_unique.information3 >=
17591: ben_pd_copy_to_ben_one.g_copy_effective_date)
17592: ) then
17585: -- End Prefix Sufix derivation
17586: for r_EPZ_unique in c_unique_EPZ('EPZ') loop
17587:
17588: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17589: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17590: r_EPZ_unique.information3 >=
17591: ben_pd_copy_to_ben_one.g_copy_effective_date)
17592: ) then
17593: --
17587:
17588: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17589: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17590: r_EPZ_unique.information3 >=
17591: ben_pd_copy_to_ben_one.g_copy_effective_date)
17592: ) then
17593: --
17594: hr_utility.set_location(' r_EPZ_unique.table_route_id '||r_EPZ_unique.table_route_id,10);
17595: hr_utility.set_location(' r_EPZ_unique.information1 '||r_EPZ_unique.information1,10);
17625: l_object_found_in_target := TRUE;
17626: --
17627: if l_process_date between r_EPZ_unique.information2 and r_EPZ_unique.information3 then
17628: l_update := true;
17629: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17630: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPZ_unique.information1 ;
17626: --
17627: if l_process_date between r_EPZ_unique.information2 and r_EPZ_unique.information3 then
17628: l_update := true;
17629: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17630: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPZ_unique.information1 ;
17634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17627: if l_process_date between r_EPZ_unique.information2 and r_EPZ_unique.information3 then
17628: l_update := true;
17629: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17630: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPZ_unique.information1 ;
17634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17628: l_update := true;
17629: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17630: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPZ_unique.information1 ;
17634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17636: --
17629: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17630: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPZ_unique.information1 ;
17634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17636: --
17637: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17630: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPZ_unique.information1 ;
17634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17636: --
17637: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17638: --
17631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPZ_unique.information1 ;
17634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17636: --
17637: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17638: --
17639: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPZ_unique.information1 ;
17634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17636: --
17637: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17638: --
17639: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17640: --
17641: -- log_data('EPZ',l_new_value,l_prefix || r_EPZ_unique.name|| l_suffix,'REUSED');
17635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17636: --
17637: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17638: --
17639: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17640: --
17641: -- log_data('EPZ',l_new_value,l_prefix || r_EPZ_unique.name|| l_suffix,'REUSED');
17642: --
17643: end if ;
17656: open c_EPZ_min_max_dates(r_EPZ_unique.table_route_id, r_EPZ_unique.information1 ) ;
17657: fetch c_EPZ_min_max_dates into l_min_esd,l_max_eed ;
17658: --
17659:
17660: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17661: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17662: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17663: end if;
17664: l_min_esd := greatest(l_min_esd,r_EPZ_unique.information2);
17657: fetch c_EPZ_min_max_dates into l_min_esd,l_max_eed ;
17658: --
17659:
17660: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17661: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17662: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17663: end if;
17664: l_min_esd := greatest(l_min_esd,r_EPZ_unique.information2);
17665: /**********************moved up from here **********************
17658: --
17659:
17660: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17661: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17662: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17663: end if;
17664: l_min_esd := greatest(l_min_esd,r_EPZ_unique.information2);
17665: /**********************moved up from here **********************
17666: open c_EPZ(r_EPZ_unique.table_route_id,
17693: p_from_date => l_min_esd,
17694: p_to_date => l_max_eed );
17695: if l_dt_rec_found THEN
17696: --END TEMPIK
17697: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17698: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17694: p_to_date => l_max_eed );
17695: if l_dt_rec_found THEN
17696: --END TEMPIK
17697: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17698: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17695: if l_dt_rec_found THEN
17696: --END TEMPIK
17697: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17698: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17696: --END TEMPIK
17697: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17698: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17704: --
17697: if r_EPZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
17698: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17704: --
17705: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17698: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_PRTE_ID' then
17699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17704: --
17705: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17706: --
17699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ_unique.information1 ;
17701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17704: --
17705: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17706: --
17707: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17704: --
17705: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17706: --
17707: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17708: end if ;
17709: --
17703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17704: --
17705: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17706: --
17707: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17708: end if ;
17709: --
17710: l_object_found_in_target := true ;
17711: --TEMPIK
17739: end if ;
17740: --
17741:
17742: l_effective_date := r_EPZ.information2;
17743: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17744: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17745: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17746: end if;
17747:
17740: --
17741:
17742: l_effective_date := r_EPZ.information2;
17743: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17744: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17745: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17746: end if;
17747:
17748: if l_first_rec and not l_update then
17741:
17742: l_effective_date := r_EPZ.information2;
17743: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17744: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17745: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17746: end if;
17747:
17748: if l_first_rec and not l_update then
17749: -- Call Create routine.
17800: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
17801: -- Update all relevent cer records with new pk_id
17802: hr_utility.set_location('Before plsql table ',222);
17803: hr_utility.set_location('new_value id '||l_elig_pstl_cd_r_rng_prte_id,222);
17804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ.information1 ;
17806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_PRTE_ID ;
17807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17801: -- Update all relevent cer records with new pk_id
17802: hr_utility.set_location('Before plsql table ',222);
17803: hr_utility.set_location('new_value id '||l_elig_pstl_cd_r_rng_prte_id,222);
17804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ.information1 ;
17806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_PRTE_ID ;
17807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17809: hr_utility.set_location('After plsql table ',222);
17802: hr_utility.set_location('Before plsql table ',222);
17803: hr_utility.set_location('new_value id '||l_elig_pstl_cd_r_rng_prte_id,222);
17804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ.information1 ;
17806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_PRTE_ID ;
17807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17809: hr_utility.set_location('After plsql table ',222);
17810: --
17803: hr_utility.set_location('new_value id '||l_elig_pstl_cd_r_rng_prte_id,222);
17804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ.information1 ;
17806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_PRTE_ID ;
17807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17809: hr_utility.set_location('After plsql table ',222);
17810: --
17811: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_PRTE_ID' ;
17805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPZ.information1 ;
17806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_PRTE_ID ;
17807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17809: hr_utility.set_location('After plsql table ',222);
17810: --
17811: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17812: --
17807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPZ_unique.table_route_id;
17809: hr_utility.set_location('After plsql table ',222);
17810: --
17811: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17812: --
17813: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17814: --
17815: else
17809: hr_utility.set_location('After plsql table ',222);
17810: --
17811: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17812: --
17813: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17814: --
17815: else
17816: --
17817: -- Call Update routine for the pk_id created in prev run .
17927: end loop;
17928: --
17929: exception when others then
17930: --
17931: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPZ',r_EPZ.information5 ) ;
17932: --
17933: end create_EPZ_rows;
17934:
17935: --
18068: end if ;
18069: -- End Prefix Sufix derivation
18070: for r_EQT_unique in c_unique_EQT('EQT') loop
18071:
18072: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18073: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18074: r_EQT_unique.information3 >=
18075: ben_pd_copy_to_ben_one.g_copy_effective_date)
18076: ) then
18069: -- End Prefix Sufix derivation
18070: for r_EQT_unique in c_unique_EQT('EQT') loop
18071:
18072: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18073: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18074: r_EQT_unique.information3 >=
18075: ben_pd_copy_to_ben_one.g_copy_effective_date)
18076: ) then
18077: --
18071:
18072: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18073: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18074: r_EQT_unique.information3 >=
18075: ben_pd_copy_to_ben_one.g_copy_effective_date)
18076: ) then
18077: --
18078: hr_utility.set_location(' r_EQT_unique.table_route_id '||r_EQT_unique.table_route_id,10);
18079: hr_utility.set_location(' r_EQT_unique.information1 '||r_EQT_unique.information1,10);
18099: --
18100: close c_EQT ;
18101: --
18102: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EQT.INFORMATION263,l_dml_operation);
18103: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
18104: l_QUALIFICATION_TYPE_ID := r_EQT.information176;
18105: else
18106: l_QUALIFICATION_TYPE_ID := r_EQT.information174;
18107: end if;
18113: l_object_found_in_target := TRUE;
18114: --
18115: if l_process_date between r_EQT_unique.information2 and r_EQT_unique.information3 then
18116: l_update := true;
18117: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQT_unique.information1 ;
18114: --
18115: if l_process_date between r_EQT_unique.information2 and r_EQT_unique.information3 then
18116: l_update := true;
18117: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQT_unique.information1 ;
18122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18115: if l_process_date between r_EQT_unique.information2 and r_EQT_unique.information3 then
18116: l_update := true;
18117: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQT_unique.information1 ;
18122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18116: l_update := true;
18117: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQT_unique.information1 ;
18122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18124: --
18117: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQT_unique.information1 ;
18122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18124: --
18125: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQT_unique.information1 ;
18122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18124: --
18125: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18126: --
18119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQT_unique.information1 ;
18122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18124: --
18125: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18126: --
18127: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQT_unique.information1 ;
18122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18124: --
18125: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18126: --
18127: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18128: --
18129: -- log_data('EQT',l_new_value,l_prefix || r_EQT_unique.name|| l_suffix,'REUSED');
18123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18124: --
18125: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18126: --
18127: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18128: --
18129: -- log_data('EQT',l_new_value,l_prefix || r_EQT_unique.name|| l_suffix,'REUSED');
18130: --
18131: end if ;
18144: open c_EQT_min_max_dates(r_EQT_unique.table_route_id, r_EQT_unique.information1 ) ;
18145: fetch c_EQT_min_max_dates into l_min_esd,l_max_eed ;
18146: --
18147:
18148: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18149: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18150: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18151: end if;
18152: l_min_esd := greatest(l_min_esd,r_EQT_unique.information2);
18145: fetch c_EQT_min_max_dates into l_min_esd,l_max_eed ;
18146: --
18147:
18148: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18149: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18150: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18151: end if;
18152: l_min_esd := greatest(l_min_esd,r_EQT_unique.information2);
18153: /**********************moved up from here **********************
18146: --
18147:
18148: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18149: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18150: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18151: end if;
18152: l_min_esd := greatest(l_min_esd,r_EQT_unique.information2);
18153: /**********************moved up from here **********************
18154: open c_EQT(r_EQT_unique.table_route_id,
18160: --
18161: close c_EQT ;
18162: --
18163: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EQT.INFORMATION263,l_dml_operation);
18164: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
18165: l_QUALIFICATION_TYPE_ID := r_EQT.information176;
18166: else
18167: l_QUALIFICATION_TYPE_ID := r_EQT.information174;
18168: end if;
18197: p_from_date => l_min_esd,
18198: p_to_date => l_max_eed );
18199: if l_dt_rec_found THEN
18200: --END TEMPIK
18201: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18202: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18198: p_to_date => l_max_eed );
18199: if l_dt_rec_found THEN
18200: --END TEMPIK
18201: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18202: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18199: if l_dt_rec_found THEN
18200: --END TEMPIK
18201: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18202: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18200: --END TEMPIK
18201: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18202: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18208: --
18201: if r_EQT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18202: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18208: --
18209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18202: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUAL_TITL_PRTE_ID' then
18203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18208: --
18209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18210: --
18203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT_unique.information1 ;
18205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18208: --
18209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18210: --
18211: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18206: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18208: --
18209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18210: --
18211: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18212: end if ;
18213: --
18207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18208: --
18209: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18210: --
18211: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18212: end if ;
18213: --
18214: l_object_found_in_target := true ;
18215: --TEMPIK
18243: end if ;
18244: --
18245:
18246: l_effective_date := r_EQT.information2;
18247: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18248: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18249: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18250: end if;
18251:
18244: --
18245:
18246: l_effective_date := r_EQT.information2;
18247: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18248: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18249: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18250: end if;
18251:
18252: if l_first_rec and not l_update then
18245:
18246: l_effective_date := r_EQT.information2;
18247: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18248: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18249: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18250: end if;
18251:
18252: if l_first_rec and not l_update then
18253: -- Call Create routine.
18309: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
18310: -- Update all relevent cer records with new pk_id
18311: hr_utility.set_location('Before plsql table ',222);
18312: hr_utility.set_location('new_value id '||l_elig_qual_titl_prte_id,222);
18313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT.information1 ;
18315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUAL_TITL_PRTE_ID ;
18316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18310: -- Update all relevent cer records with new pk_id
18311: hr_utility.set_location('Before plsql table ',222);
18312: hr_utility.set_location('new_value id '||l_elig_qual_titl_prte_id,222);
18313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT.information1 ;
18315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUAL_TITL_PRTE_ID ;
18316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18318: hr_utility.set_location('After plsql table ',222);
18311: hr_utility.set_location('Before plsql table ',222);
18312: hr_utility.set_location('new_value id '||l_elig_qual_titl_prte_id,222);
18313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT.information1 ;
18315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUAL_TITL_PRTE_ID ;
18316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18318: hr_utility.set_location('After plsql table ',222);
18319: --
18312: hr_utility.set_location('new_value id '||l_elig_qual_titl_prte_id,222);
18313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT.information1 ;
18315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUAL_TITL_PRTE_ID ;
18316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18318: hr_utility.set_location('After plsql table ',222);
18319: --
18320: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUAL_TITL_PRTE_ID' ;
18314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQT.information1 ;
18315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUAL_TITL_PRTE_ID ;
18316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18318: hr_utility.set_location('After plsql table ',222);
18319: --
18320: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18321: --
18316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQT_unique.table_route_id;
18318: hr_utility.set_location('After plsql table ',222);
18319: --
18320: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18321: --
18322: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18323: --
18324: else
18318: hr_utility.set_location('After plsql table ',222);
18319: --
18320: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18321: --
18322: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18323: --
18324: else
18325: --
18326: -- Call Update routine for the pk_id created in prev run .
18442: end loop;
18443: --
18444: exception when others then
18445: --
18446: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EQT',r_EQT.information5 ) ;
18447: --
18448: end create_EQT_rows;
18449:
18450: --
18587: end if ;
18588: -- End Prefix Sufix derivation
18589: for r_ESA_unique in c_unique_ESA('ESA') loop
18590:
18591: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18592: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18593: r_ESA_unique.information3 >=
18594: ben_pd_copy_to_ben_one.g_copy_effective_date)
18595: ) then
18588: -- End Prefix Sufix derivation
18589: for r_ESA_unique in c_unique_ESA('ESA') loop
18590:
18591: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18592: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18593: r_ESA_unique.information3 >=
18594: ben_pd_copy_to_ben_one.g_copy_effective_date)
18595: ) then
18596: --
18590:
18591: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18592: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18593: r_ESA_unique.information3 >=
18594: ben_pd_copy_to_ben_one.g_copy_effective_date)
18595: ) then
18596: --
18597: hr_utility.set_location(' r_ESA_unique.table_route_id '||r_ESA_unique.table_route_id,10);
18598: hr_utility.set_location(' r_ESA_unique.information1 '||r_ESA_unique.information1,10);
18633: l_object_found_in_target := TRUE;
18634: --
18635: if l_process_date between r_ESA_unique.information2 and r_ESA_unique.information3 then
18636: l_update := true;
18637: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESA_unique.information1 ;
18634: --
18635: if l_process_date between r_ESA_unique.information2 and r_ESA_unique.information3 then
18636: l_update := true;
18637: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESA_unique.information1 ;
18642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18635: if l_process_date between r_ESA_unique.information2 and r_ESA_unique.information3 then
18636: l_update := true;
18637: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESA_unique.information1 ;
18642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18636: l_update := true;
18637: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESA_unique.information1 ;
18642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18644: --
18637: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESA_unique.information1 ;
18642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18644: --
18645: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESA_unique.information1 ;
18642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18644: --
18645: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18646: --
18639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESA_unique.information1 ;
18642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18644: --
18645: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18646: --
18647: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESA_unique.information1 ;
18642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18644: --
18645: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18646: --
18647: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18648: --
18649: -- log_data('ESA',l_new_value,l_prefix || r_ESA_unique.name|| l_suffix,'REUSED');
18643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18644: --
18645: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18646: --
18647: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18648: --
18649: -- log_data('ESA',l_new_value,l_prefix || r_ESA_unique.name|| l_suffix,'REUSED');
18650: --
18651: end if ;
18664: open c_ESA_min_max_dates(r_ESA_unique.table_route_id, r_ESA_unique.information1 ) ;
18665: fetch c_ESA_min_max_dates into l_min_esd,l_max_eed ;
18666: --
18667:
18668: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18669: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18670: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18671: end if;
18672: l_min_esd := greatest(l_min_esd,r_ESA_unique.information2);
18665: fetch c_ESA_min_max_dates into l_min_esd,l_max_eed ;
18666: --
18667:
18668: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18669: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18670: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18671: end if;
18672: l_min_esd := greatest(l_min_esd,r_ESA_unique.information2);
18673: /**********************moved up from here **********************
18666: --
18667:
18668: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18669: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18670: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18671: end if;
18672: l_min_esd := greatest(l_min_esd,r_ESA_unique.information2);
18673: /**********************moved up from here **********************
18674: open c_ESA(r_ESA_unique.table_route_id,
18707: p_from_date => l_min_esd,
18708: p_to_date => l_max_eed );
18709: if l_dt_rec_found THEN
18710: --END TEMPIK
18711: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18712: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18713: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18708: p_to_date => l_max_eed );
18709: if l_dt_rec_found THEN
18710: --END TEMPIK
18711: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18712: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18713: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18709: if l_dt_rec_found THEN
18710: --END TEMPIK
18711: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18712: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18713: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18710: --END TEMPIK
18711: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18712: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18713: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18718: --
18711: if r_ESA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
18712: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18713: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18718: --
18719: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18712: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SVC_AREA_PRTE_ID' then
18713: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18718: --
18719: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18720: --
18713: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA_unique.information1 ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18718: --
18719: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18720: --
18721: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18718: --
18719: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18720: --
18721: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18722: end if ;
18723: --
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18718: --
18719: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18720: --
18721: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18722: end if ;
18723: --
18724: l_object_found_in_target := true ;
18725: --TEMPIK
18753: end if ;
18754: --
18755:
18756: l_effective_date := r_ESA.information2;
18757: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18758: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18759: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18760: end if;
18761:
18754: --
18755:
18756: l_effective_date := r_ESA.information2;
18757: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18758: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18759: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18760: end if;
18761:
18762: if l_first_rec and not l_update then
18755:
18756: l_effective_date := r_ESA.information2;
18757: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18758: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18759: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18760: end if;
18761:
18762: if l_first_rec and not l_update then
18763: -- Call Create routine.
18818: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
18819: -- Update all relevent cer records with new pk_id
18820: hr_utility.set_location('Before plsql table ',222);
18821: hr_utility.set_location('new_value id '||l_elig_svc_area_prte_id,222);
18822: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18823: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA.information1 ;
18824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SVC_AREA_PRTE_ID ;
18825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18819: -- Update all relevent cer records with new pk_id
18820: hr_utility.set_location('Before plsql table ',222);
18821: hr_utility.set_location('new_value id '||l_elig_svc_area_prte_id,222);
18822: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18823: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA.information1 ;
18824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SVC_AREA_PRTE_ID ;
18825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18827: hr_utility.set_location('After plsql table ',222);
18820: hr_utility.set_location('Before plsql table ',222);
18821: hr_utility.set_location('new_value id '||l_elig_svc_area_prte_id,222);
18822: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18823: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA.information1 ;
18824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SVC_AREA_PRTE_ID ;
18825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18827: hr_utility.set_location('After plsql table ',222);
18828: --
18821: hr_utility.set_location('new_value id '||l_elig_svc_area_prte_id,222);
18822: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18823: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA.information1 ;
18824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SVC_AREA_PRTE_ID ;
18825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18827: hr_utility.set_location('After plsql table ',222);
18828: --
18829: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18822: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SVC_AREA_PRTE_ID' ;
18823: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESA.information1 ;
18824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SVC_AREA_PRTE_ID ;
18825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18827: hr_utility.set_location('After plsql table ',222);
18828: --
18829: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18830: --
18825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESA_unique.table_route_id;
18827: hr_utility.set_location('After plsql table ',222);
18828: --
18829: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18830: --
18831: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18832: --
18833: else
18827: hr_utility.set_location('After plsql table ',222);
18828: --
18829: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18830: --
18831: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18832: --
18833: else
18834: --
18835: -- Call Update routine for the pk_id created in prev run .
18948: end loop;
18949: --
18950: exception when others then
18951: --
18952: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ESA',r_ESA.information5 ) ;
18953: --
18954: end create_ESA_rows;
18955:
18956: --
19122: end if ;
19123: -- End Prefix Sufix derivation
19124: for r_ESH_unique in c_unique_ESH('ESH') loop
19125:
19126: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19127: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19128: r_ESH_unique.information3 >=
19129: ben_pd_copy_to_ben_one.g_copy_effective_date)
19130: ) then
19123: -- End Prefix Sufix derivation
19124: for r_ESH_unique in c_unique_ESH('ESH') loop
19125:
19126: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19127: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19128: r_ESH_unique.information3 >=
19129: ben_pd_copy_to_ben_one.g_copy_effective_date)
19130: ) then
19131: --
19125:
19126: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19127: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19128: r_ESH_unique.information3 >=
19129: ben_pd_copy_to_ben_one.g_copy_effective_date)
19130: ) then
19131: --
19132: hr_utility.set_location(' r_ESH_unique.table_route_id '||r_ESH_unique.table_route_id,10);
19133: hr_utility.set_location(' r_ESH_unique.information1 '||r_ESH_unique.information1,10);
19171: l_object_found_in_target := TRUE;
19172: --
19173: if l_process_date between r_ESH_unique.information2 and r_ESH_unique.information3 then
19174: l_update := true;
19175: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19176: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESH_unique.information1 ;
19172: --
19173: if l_process_date between r_ESH_unique.information2 and r_ESH_unique.information3 then
19174: l_update := true;
19175: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19176: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESH_unique.information1 ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19173: if l_process_date between r_ESH_unique.information2 and r_ESH_unique.information3 then
19174: l_update := true;
19175: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19176: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESH_unique.information1 ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19174: l_update := true;
19175: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19176: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESH_unique.information1 ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19182: --
19175: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19176: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESH_unique.information1 ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19182: --
19183: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19176: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESH_unique.information1 ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19182: --
19183: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19184: --
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESH_unique.information1 ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19182: --
19183: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19184: --
19185: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESH_unique.information1 ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19182: --
19183: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19184: --
19185: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19186: --
19187: -- log_data('ESH',l_new_value,l_prefix || r_ESH_unique.name|| l_suffix,'REUSED');
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19182: --
19183: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19184: --
19185: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19186: --
19187: -- log_data('ESH',l_new_value,l_prefix || r_ESH_unique.name|| l_suffix,'REUSED');
19188: --
19189: end if ;
19202: open c_ESH_min_max_dates(r_ESH_unique.table_route_id, r_ESH_unique.information1 ) ;
19203: fetch c_ESH_min_max_dates into l_min_esd,l_max_eed ;
19204: --
19205:
19206: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19207: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19208: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19209: end if;
19210: l_min_esd := greatest(l_min_esd,r_ESH_unique.information2);
19203: fetch c_ESH_min_max_dates into l_min_esd,l_max_eed ;
19204: --
19205:
19206: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19207: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19208: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19209: end if;
19210: l_min_esd := greatest(l_min_esd,r_ESH_unique.information2);
19211: /**********************moved up from here **********************
19204: --
19205:
19206: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19207: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19208: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19209: end if;
19210: l_min_esd := greatest(l_min_esd,r_ESH_unique.information2);
19211: /**********************moved up from here **********************
19212: open c_ESH(r_ESH_unique.table_route_id,
19248: p_from_date => l_min_esd,
19249: p_to_date => l_max_eed );
19250: if l_dt_rec_found THEN
19251: --END TEMPIK
19252: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19253: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19249: p_to_date => l_max_eed );
19250: if l_dt_rec_found THEN
19251: --END TEMPIK
19252: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19253: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19250: if l_dt_rec_found THEN
19251: --END TEMPIK
19252: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19253: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19251: --END TEMPIK
19252: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19253: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19259: --
19252: if r_ESH_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19253: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19259: --
19260: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19253: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SCHEDD_HRS_PRTE_ID' then
19254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19259: --
19260: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19261: --
19254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH_unique.information1 ;
19256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19259: --
19260: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19261: --
19262: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19259: --
19260: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19261: --
19262: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19263: end if ;
19264: --
19258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19259: --
19260: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19261: --
19262: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19263: end if ;
19264: --
19265: l_object_found_in_target := true ;
19266: --TEMPIK
19294: end if ;
19295: --
19296:
19297: l_effective_date := r_ESH.information2;
19298: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19299: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19300: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19301: end if;
19302:
19295: --
19296:
19297: l_effective_date := r_ESH.information2;
19298: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19299: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19300: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19301: end if;
19302:
19303: if l_first_rec and not l_update then
19296:
19297: l_effective_date := r_ESH.information2;
19298: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19299: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19300: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19301: end if;
19302:
19303: if l_first_rec and not l_update then
19304: -- Call Create routine.
19366: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
19367: -- Update all relevent cer records with new pk_id
19368: hr_utility.set_location('Before plsql table ',222);
19369: hr_utility.set_location('new_value id '||l_elig_schedd_hrs_prte_id,222);
19370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH.information1 ;
19372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SCHEDD_HRS_PRTE_ID ;
19373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19367: -- Update all relevent cer records with new pk_id
19368: hr_utility.set_location('Before plsql table ',222);
19369: hr_utility.set_location('new_value id '||l_elig_schedd_hrs_prte_id,222);
19370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH.information1 ;
19372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SCHEDD_HRS_PRTE_ID ;
19373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19375: hr_utility.set_location('After plsql table ',222);
19368: hr_utility.set_location('Before plsql table ',222);
19369: hr_utility.set_location('new_value id '||l_elig_schedd_hrs_prte_id,222);
19370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH.information1 ;
19372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SCHEDD_HRS_PRTE_ID ;
19373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19375: hr_utility.set_location('After plsql table ',222);
19376: --
19369: hr_utility.set_location('new_value id '||l_elig_schedd_hrs_prte_id,222);
19370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH.information1 ;
19372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SCHEDD_HRS_PRTE_ID ;
19373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19375: hr_utility.set_location('After plsql table ',222);
19376: --
19377: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SCHEDD_HRS_PRTE_ID' ;
19371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESH.information1 ;
19372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SCHEDD_HRS_PRTE_ID ;
19373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19375: hr_utility.set_location('After plsql table ',222);
19376: --
19377: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19378: --
19373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESH_unique.table_route_id;
19375: hr_utility.set_location('After plsql table ',222);
19376: --
19377: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19378: --
19379: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19380: --
19381: else
19375: hr_utility.set_location('After plsql table ',222);
19376: --
19377: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19378: --
19379: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19380: --
19381: else
19382: --
19383: -- Call Update routine for the pk_id created in prev run .
19503: end loop;
19504: --
19505: exception when others then
19506: --
19507: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ESH',r_ESH.information5 ) ;
19508: --
19509: end create_ESH_rows;
19510:
19511: --
19647: end if ;
19648: -- End Prefix Sufix derivation
19649: for r_ESP_unique in c_unique_ESP('ESP') loop
19650:
19651: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19652: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19653: r_ESP_unique.information3 >=
19654: ben_pd_copy_to_ben_one.g_copy_effective_date)
19655: ) then
19648: -- End Prefix Sufix derivation
19649: for r_ESP_unique in c_unique_ESP('ESP') loop
19650:
19651: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19652: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19653: r_ESP_unique.information3 >=
19654: ben_pd_copy_to_ben_one.g_copy_effective_date)
19655: ) then
19656: --
19650:
19651: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19652: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19653: r_ESP_unique.information3 >=
19654: ben_pd_copy_to_ben_one.g_copy_effective_date)
19655: ) then
19656: --
19657: hr_utility.set_location(' r_ESP_unique.table_route_id '||r_ESP_unique.table_route_id,10);
19658: hr_utility.set_location(' r_ESP_unique.information1 '||r_ESP_unique.information1,10);
19678: --
19679: close c_ESP ;
19680: --
19681: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_ESP.INFORMATION263,l_dml_operation);
19682: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
19683: l_SPECIAL_CEILING_STEP_ID := r_ESP.information176;
19684: else
19685: l_SPECIAL_CEILING_STEP_ID := r_ESP.information174;
19686: end if;
19694: l_object_found_in_target := TRUE;
19695: --
19696: if l_process_date between r_ESP_unique.information2 and r_ESP_unique.information3 then
19697: l_update := true;
19698: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESP_unique.information1 ;
19695: --
19696: if l_process_date between r_ESP_unique.information2 and r_ESP_unique.information3 then
19697: l_update := true;
19698: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESP_unique.information1 ;
19703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19696: if l_process_date between r_ESP_unique.information2 and r_ESP_unique.information3 then
19697: l_update := true;
19698: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESP_unique.information1 ;
19703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19697: l_update := true;
19698: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESP_unique.information1 ;
19703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19705: --
19698: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESP_unique.information1 ;
19703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19705: --
19706: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESP_unique.information1 ;
19703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19705: --
19706: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19707: --
19700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESP_unique.information1 ;
19703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19705: --
19706: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19707: --
19708: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESP_unique.information1 ;
19703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19705: --
19706: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19707: --
19708: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19709: --
19710: -- log_data('ESP',l_new_value,l_prefix || r_ESP_unique.name|| l_suffix,'REUSED');
19704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19705: --
19706: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19707: --
19708: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19709: --
19710: -- log_data('ESP',l_new_value,l_prefix || r_ESP_unique.name|| l_suffix,'REUSED');
19711: --
19712: end if ;
19725: open c_ESP_min_max_dates(r_ESP_unique.table_route_id, r_ESP_unique.information1 ) ;
19726: fetch c_ESP_min_max_dates into l_min_esd,l_max_eed ;
19727: --
19728:
19729: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19730: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19731: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19732: end if;
19733: l_min_esd := greatest(l_min_esd,r_ESP_unique.information2);
19726: fetch c_ESP_min_max_dates into l_min_esd,l_max_eed ;
19727: --
19728:
19729: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19730: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19731: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19732: end if;
19733: l_min_esd := greatest(l_min_esd,r_ESP_unique.information2);
19734: /**********************moved up from here **********************
19727: --
19728:
19729: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19730: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19731: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19732: end if;
19733: l_min_esd := greatest(l_min_esd,r_ESP_unique.information2);
19734: /**********************moved up from here **********************
19735: open c_ESP(r_ESP_unique.table_route_id,
19741: --
19742: close c_ESP ;
19743: --
19744: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_ESP.INFORMATION263,l_dml_operation);
19745: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
19746: l_SPECIAL_CEILING_STEP_ID := r_ESP.information176;
19747: else
19748: l_SPECIAL_CEILING_STEP_ID := r_ESP.information174;
19749: end if;
19780: p_from_date => l_min_esd,
19781: p_to_date => l_max_eed );
19782: if l_dt_rec_found THEN
19783: --END TEMPIK
19784: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19785: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19786: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19787: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19788: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19781: p_to_date => l_max_eed );
19782: if l_dt_rec_found THEN
19783: --END TEMPIK
19784: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19785: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19786: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19787: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19788: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19782: if l_dt_rec_found THEN
19783: --END TEMPIK
19784: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19785: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19786: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19787: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19788: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19783: --END TEMPIK
19784: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19785: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19786: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19787: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19788: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19791: --
19784: if r_ESP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
19785: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19786: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19787: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19788: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19791: --
19792: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19785: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SP_CLNG_PRG_PRTE_ID' then
19786: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19787: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19788: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19791: --
19792: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19793: --
19786: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19787: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP_unique.information1 ;
19788: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19791: --
19792: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19793: --
19794: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19788: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19791: --
19792: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19793: --
19794: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19795: end if ;
19796: --
19790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19791: --
19792: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19793: --
19794: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19795: end if ;
19796: --
19797: l_object_found_in_target := true ;
19798: --TEMPIK
19827: end if ;
19828: --
19829:
19830: l_effective_date := r_ESP.information2;
19831: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19832: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19833: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19834: end if;
19835:
19828: --
19829:
19830: l_effective_date := r_ESP.information2;
19831: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19832: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19833: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19834: end if;
19835:
19836: if l_first_rec and not l_update then
19829:
19830: l_effective_date := r_ESP.information2;
19831: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19832: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19833: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19834: end if;
19835:
19836: if l_first_rec and not l_update then
19837: -- Call Create routine.
19892: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
19893: -- Update all relevent cer records with new pk_id
19894: hr_utility.set_location('Before plsql table ',222);
19895: hr_utility.set_location('new_value id '||l_elig_sp_clng_prg_prte_id,222);
19896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP.information1 ;
19898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SP_CLNG_PRG_PRTE_ID ;
19899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19893: -- Update all relevent cer records with new pk_id
19894: hr_utility.set_location('Before plsql table ',222);
19895: hr_utility.set_location('new_value id '||l_elig_sp_clng_prg_prte_id,222);
19896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP.information1 ;
19898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SP_CLNG_PRG_PRTE_ID ;
19899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19901: hr_utility.set_location('After plsql table ',222);
19894: hr_utility.set_location('Before plsql table ',222);
19895: hr_utility.set_location('new_value id '||l_elig_sp_clng_prg_prte_id,222);
19896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP.information1 ;
19898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SP_CLNG_PRG_PRTE_ID ;
19899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19901: hr_utility.set_location('After plsql table ',222);
19902: --
19895: hr_utility.set_location('new_value id '||l_elig_sp_clng_prg_prte_id,222);
19896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP.information1 ;
19898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SP_CLNG_PRG_PRTE_ID ;
19899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19901: hr_utility.set_location('After plsql table ',222);
19902: --
19903: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SP_CLNG_PRG_PRTE_ID' ;
19897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESP.information1 ;
19898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SP_CLNG_PRG_PRTE_ID ;
19899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19901: hr_utility.set_location('After plsql table ',222);
19902: --
19903: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19904: --
19899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESP_unique.table_route_id;
19901: hr_utility.set_location('After plsql table ',222);
19902: --
19903: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19904: --
19905: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19906: --
19907: else
19901: hr_utility.set_location('After plsql table ',222);
19902: --
19903: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19904: --
19905: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19906: --
19907: else
19908: --
19909: -- Call Update routine for the pk_id created in prev run .
20024: end loop;
20025: --
20026: exception when others then
20027: --
20028: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ESP',r_ESP.information5 ) ;
20029: --
20030: end create_ESP_rows;
20031:
20032: --
20169: end if ;
20170: -- End Prefix Sufix derivation
20171: for r_EST_unique in c_unique_EST('EST') loop
20172:
20173: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20174: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20175: r_EST_unique.information3 >=
20176: ben_pd_copy_to_ben_one.g_copy_effective_date)
20177: ) then
20170: -- End Prefix Sufix derivation
20171: for r_EST_unique in c_unique_EST('EST') loop
20172:
20173: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20174: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20175: r_EST_unique.information3 >=
20176: ben_pd_copy_to_ben_one.g_copy_effective_date)
20177: ) then
20178: --
20172:
20173: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20174: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20175: r_EST_unique.information3 >=
20176: ben_pd_copy_to_ben_one.g_copy_effective_date)
20177: ) then
20178: --
20179: hr_utility.set_location(' r_EST_unique.table_route_id '||r_EST_unique.table_route_id,10);
20180: hr_utility.set_location(' r_EST_unique.information1 '||r_EST_unique.information1,10);
20202: close c_EST ;
20203: --
20204: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EST.INFORMATION263,l_dml_operation);
20205:
20206: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
20207: l_JOB_GROUP_ID := r_EST.information176;
20208: l_JOB_ID := r_EST.information180;
20209: else
20210: l_JOB_GROUP_ID := r_EST.information174;
20217: l_object_found_in_target := TRUE;
20218: --
20219: if l_process_date between r_EST_unique.information2 and r_EST_unique.information3 then
20220: l_update := true;
20221: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20222: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EST_unique.information1 ;
20218: --
20219: if l_process_date between r_EST_unique.information2 and r_EST_unique.information3 then
20220: l_update := true;
20221: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20222: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EST_unique.information1 ;
20226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20219: if l_process_date between r_EST_unique.information2 and r_EST_unique.information3 then
20220: l_update := true;
20221: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20222: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EST_unique.information1 ;
20226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20220: l_update := true;
20221: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20222: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EST_unique.information1 ;
20226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20228: --
20221: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20222: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EST_unique.information1 ;
20226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20228: --
20229: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20222: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EST_unique.information1 ;
20226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20228: --
20229: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20230: --
20223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EST_unique.information1 ;
20226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20228: --
20229: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20230: --
20231: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EST_unique.information1 ;
20226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20228: --
20229: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20230: --
20231: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20232: --
20233: -- log_data('EST',l_new_value,l_prefix || r_EST_unique.name|| l_suffix,'REUSED');
20227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20228: --
20229: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20230: --
20231: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20232: --
20233: -- log_data('EST',l_new_value,l_prefix || r_EST_unique.name|| l_suffix,'REUSED');
20234: --
20235: end if ;
20248: open c_EST_min_max_dates(r_EST_unique.table_route_id, r_EST_unique.information1 ) ;
20249: fetch c_EST_min_max_dates into l_min_esd,l_max_eed ;
20250: --
20251:
20252: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20253: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20254: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20255: end if;
20256: l_min_esd := greatest(l_min_esd,r_EST_unique.information2);
20249: fetch c_EST_min_max_dates into l_min_esd,l_max_eed ;
20250: --
20251:
20252: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20253: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20254: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20255: end if;
20256: l_min_esd := greatest(l_min_esd,r_EST_unique.information2);
20257: /**********************moved up from here **********************
20250: --
20251:
20252: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20253: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20254: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20255: end if;
20256: l_min_esd := greatest(l_min_esd,r_EST_unique.information2);
20257: /**********************moved up from here **********************
20258: open c_EST(r_EST_unique.table_route_id,
20265: close c_EST ;
20266: --
20267: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EST.INFORMATION263,l_dml_operation);
20268:
20269: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
20270: l_JOB_GROUP_ID := r_EST.information176;
20271: l_JOB_ID := r_EST.information180;
20272: else
20273: l_JOB_GROUP_ID := r_EST.information174;
20304: p_from_date => l_min_esd,
20305: p_to_date => l_max_eed );
20306: if l_dt_rec_found THEN
20307: --END TEMPIK
20308: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20305: p_to_date => l_max_eed );
20306: if l_dt_rec_found THEN
20307: --END TEMPIK
20308: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20306: if l_dt_rec_found THEN
20307: --END TEMPIK
20308: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20307: --END TEMPIK
20308: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20315: --
20308: if r_EST_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20315: --
20316: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_SUPPL_ROLE_PRTE_ID' then
20310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20315: --
20316: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20317: --
20310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST_unique.information1 ;
20312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20315: --
20316: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20317: --
20318: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20315: --
20316: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20317: --
20318: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20319: end if ;
20320: --
20314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20315: --
20316: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20317: --
20318: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20319: end if ;
20320: --
20321: l_object_found_in_target := true ;
20322: --TEMPIK
20350: end if ;
20351: --
20352:
20353: l_effective_date := r_EST.information2;
20354: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20355: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20356: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20357: end if;
20358:
20351: --
20352:
20353: l_effective_date := r_EST.information2;
20354: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20355: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20356: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20357: end if;
20358:
20359: if l_first_rec and not l_update then
20352:
20353: l_effective_date := r_EST.information2;
20354: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20355: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20356: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20357: end if;
20358:
20359: if l_first_rec and not l_update then
20360: -- Call Create routine.
20416: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
20417: -- Update all relevent cer records with new pk_id
20418: hr_utility.set_location('Before plsql table ',222);
20419: hr_utility.set_location('new_value id '||l_elig_suppl_role_prte_id,222);
20420: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST.information1 ;
20422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SUPPL_ROLE_PRTE_ID ;
20423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20417: -- Update all relevent cer records with new pk_id
20418: hr_utility.set_location('Before plsql table ',222);
20419: hr_utility.set_location('new_value id '||l_elig_suppl_role_prte_id,222);
20420: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST.information1 ;
20422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SUPPL_ROLE_PRTE_ID ;
20423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20425: hr_utility.set_location('After plsql table ',222);
20418: hr_utility.set_location('Before plsql table ',222);
20419: hr_utility.set_location('new_value id '||l_elig_suppl_role_prte_id,222);
20420: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST.information1 ;
20422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SUPPL_ROLE_PRTE_ID ;
20423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20425: hr_utility.set_location('After plsql table ',222);
20426: --
20419: hr_utility.set_location('new_value id '||l_elig_suppl_role_prte_id,222);
20420: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST.information1 ;
20422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SUPPL_ROLE_PRTE_ID ;
20423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20425: hr_utility.set_location('After plsql table ',222);
20426: --
20427: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20420: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_SUPPL_ROLE_PRTE_ID' ;
20421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EST.information1 ;
20422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_SUPPL_ROLE_PRTE_ID ;
20423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20425: hr_utility.set_location('After plsql table ',222);
20426: --
20427: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20428: --
20423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EST_unique.table_route_id;
20425: hr_utility.set_location('After plsql table ',222);
20426: --
20427: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20428: --
20429: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20430: --
20431: else
20425: hr_utility.set_location('After plsql table ',222);
20426: --
20427: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20428: --
20429: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20430: --
20431: else
20432: --
20433: -- Call Update routine for the pk_id created in prev run .
20549: end loop;
20550: --
20551: exception when others then
20552: --
20553: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EST',r_EST.information5 ) ;
20554: --
20555: end create_EST_rows;
20556:
20557: --
20690: end if ;
20691: -- End Prefix Sufix derivation
20692: for r_EWL_unique in c_unique_EWL('EWL') loop
20693:
20694: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20695: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20696: r_EWL_unique.information3 >=
20697: ben_pd_copy_to_ben_one.g_copy_effective_date)
20698: ) then
20691: -- End Prefix Sufix derivation
20692: for r_EWL_unique in c_unique_EWL('EWL') loop
20693:
20694: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20695: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20696: r_EWL_unique.information3 >=
20697: ben_pd_copy_to_ben_one.g_copy_effective_date)
20698: ) then
20699: --
20693:
20694: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20695: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20696: r_EWL_unique.information3 >=
20697: ben_pd_copy_to_ben_one.g_copy_effective_date)
20698: ) then
20699: --
20700: hr_utility.set_location(' r_EWL_unique.table_route_id '||r_EWL_unique.table_route_id,10);
20701: hr_utility.set_location(' r_EWL_unique.information1 '||r_EWL_unique.information1,10);
20721: --
20722: close c_EWL ;
20723: --
20724: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EWL.INFORMATION263,l_dml_operation);
20725: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
20726: l_LOCATION_ID := r_EWL.information176;
20727: else
20728: l_LOCATION_ID := r_EWL.information174;
20729: end if;
20735: l_object_found_in_target := TRUE;
20736: --
20737: if l_process_date between r_EWL_unique.information2 and r_EWL_unique.information3 then
20738: l_update := true;
20739: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20740: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20742: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EWL_unique.information1 ;
20736: --
20737: if l_process_date between r_EWL_unique.information2 and r_EWL_unique.information3 then
20738: l_update := true;
20739: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20740: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20742: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EWL_unique.information1 ;
20744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20737: if l_process_date between r_EWL_unique.information2 and r_EWL_unique.information3 then
20738: l_update := true;
20739: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20740: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20742: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EWL_unique.information1 ;
20744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20738: l_update := true;
20739: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20740: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20742: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EWL_unique.information1 ;
20744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20746: --
20739: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20740: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20742: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EWL_unique.information1 ;
20744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20746: --
20747: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20740: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20742: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EWL_unique.information1 ;
20744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20746: --
20747: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20748: --
20741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20742: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EWL_unique.information1 ;
20744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20746: --
20747: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20748: --
20749: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20743: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EWL_unique.information1 ;
20744: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20746: --
20747: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20748: --
20749: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20750: --
20751: -- log_data('EWL',l_new_value,l_prefix || r_EWL_unique.name|| l_suffix,'REUSED');
20745: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20746: --
20747: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20748: --
20749: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20750: --
20751: -- log_data('EWL',l_new_value,l_prefix || r_EWL_unique.name|| l_suffix,'REUSED');
20752: --
20753: end if ;
20766: open c_EWL_min_max_dates(r_EWL_unique.table_route_id, r_EWL_unique.information1 ) ;
20767: fetch c_EWL_min_max_dates into l_min_esd,l_max_eed ;
20768: --
20769:
20770: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20771: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20772: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20773: end if;
20774: l_min_esd := greatest(l_min_esd,r_EWL_unique.information2);
20767: fetch c_EWL_min_max_dates into l_min_esd,l_max_eed ;
20768: --
20769:
20770: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20771: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20772: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20773: end if;
20774: l_min_esd := greatest(l_min_esd,r_EWL_unique.information2);
20775: /**********************moved up from here **********************
20768: --
20769:
20770: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20771: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20772: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20773: end if;
20774: l_min_esd := greatest(l_min_esd,r_EWL_unique.information2);
20775: /**********************moved up from here **********************
20776: open c_EWL(r_EWL_unique.table_route_id,
20782: --
20783: close c_EWL ;
20784: --
20785: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EWL.INFORMATION263,l_dml_operation);
20786: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
20787: l_LOCATION_ID := r_EWL.information176;
20788: else
20789: l_LOCATION_ID := r_EWL.information174;
20790: end if;
20818: p_from_date => l_min_esd,
20819: p_to_date => l_max_eed );
20820: if l_dt_rec_found THEN
20821: --END TEMPIK
20822: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20819: p_to_date => l_max_eed );
20820: if l_dt_rec_found THEN
20821: --END TEMPIK
20822: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20820: if l_dt_rec_found THEN
20821: --END TEMPIK
20822: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20821: --END TEMPIK
20822: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20829: --
20822: if r_EWL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
20823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20829: --
20830: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_WK_LOC_PRTE_ID' then
20824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20829: --
20830: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20831: --
20824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL_unique.information1 ;
20826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20829: --
20830: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20831: --
20832: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20829: --
20830: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20831: --
20832: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20833: end if ;
20834: --
20828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20829: --
20830: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20831: --
20832: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20833: end if ;
20834: --
20835: l_object_found_in_target := true ;
20836: --TEMPIK
20867: end if ;
20868: --
20869:
20870: l_effective_date := r_EWL.information2;
20871: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20872: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20873: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20874: end if;
20875:
20868: --
20869:
20870: l_effective_date := r_EWL.information2;
20871: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20872: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20873: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20874: end if;
20875:
20876: if l_first_rec and not l_update then
20869:
20870: l_effective_date := r_EWL.information2;
20871: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20872: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20873: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20874: end if;
20875:
20876: if l_first_rec and not l_update then
20877: -- Call Create routine.
20932: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
20933: -- Update all relevent cer records with new pk_id
20934: hr_utility.set_location('Before plsql table ',222);
20935: hr_utility.set_location('new_value id '||l_elig_wk_loc_prte_id,222);
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_WK_LOC_PRTE_ID ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20933: -- Update all relevent cer records with new pk_id
20934: hr_utility.set_location('Before plsql table ',222);
20935: hr_utility.set_location('new_value id '||l_elig_wk_loc_prte_id,222);
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_WK_LOC_PRTE_ID ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20941: hr_utility.set_location('After plsql table ',222);
20934: hr_utility.set_location('Before plsql table ',222);
20935: hr_utility.set_location('new_value id '||l_elig_wk_loc_prte_id,222);
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_WK_LOC_PRTE_ID ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20941: hr_utility.set_location('After plsql table ',222);
20942: --
20935: hr_utility.set_location('new_value id '||l_elig_wk_loc_prte_id,222);
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_WK_LOC_PRTE_ID ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20941: hr_utility.set_location('After plsql table ',222);
20942: --
20943: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_WK_LOC_PRTE_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EWL.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_WK_LOC_PRTE_ID ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20941: hr_utility.set_location('After plsql table ',222);
20942: --
20943: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20944: --
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EWL_unique.table_route_id;
20941: hr_utility.set_location('After plsql table ',222);
20942: --
20943: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20944: --
20945: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20946: --
20947: else
20941: hr_utility.set_location('After plsql table ',222);
20942: --
20943: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20944: --
20945: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20946: --
20947: else
20948: --
20949: -- Call Update routine for the pk_id created in prev run .
21064: end loop;
21065: --
21066: exception when others then
21067: --
21068: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EWL',r_EWL.information5 ) ;
21069: --
21070: end create_EWL_rows;
21071:
21072: --
21211: end if ;
21212: -- End Prefix Sufix derivation
21213: for r_ETD_unique in c_unique_ETD('ETD') loop
21214:
21215: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21216: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21217: r_ETD_unique.information3 >=
21218: ben_pd_copy_to_ben_one.g_copy_effective_date)
21219: ) then
21212: -- End Prefix Sufix derivation
21213: for r_ETD_unique in c_unique_ETD('ETD') loop
21214:
21215: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21216: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21217: r_ETD_unique.information3 >=
21218: ben_pd_copy_to_ben_one.g_copy_effective_date)
21219: ) then
21220: --
21214:
21215: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21216: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21217: r_ETD_unique.information3 >=
21218: ben_pd_copy_to_ben_one.g_copy_effective_date)
21219: ) then
21220: --
21221: hr_utility.set_location(' r_ETD_unique.table_route_id '||r_ETD_unique.table_route_id,10);
21222: hr_utility.set_location(' r_ETD_unique.information1 '||r_ETD_unique.information1,10);
21256: l_object_found_in_target := TRUE;
21257: --
21258: if l_process_date between r_ETD_unique.information2 and r_ETD_unique.information3 then
21259: l_update := true;
21260: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21261: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETD_unique.information1 ;
21257: --
21258: if l_process_date between r_ETD_unique.information2 and r_ETD_unique.information3 then
21259: l_update := true;
21260: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21261: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETD_unique.information1 ;
21265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21258: if l_process_date between r_ETD_unique.information2 and r_ETD_unique.information3 then
21259: l_update := true;
21260: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21261: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETD_unique.information1 ;
21265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21259: l_update := true;
21260: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21261: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETD_unique.information1 ;
21265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21267: --
21260: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21261: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETD_unique.information1 ;
21265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21267: --
21268: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21261: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETD_unique.information1 ;
21265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21267: --
21268: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21269: --
21262: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21263: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETD_unique.information1 ;
21265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21267: --
21268: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21269: --
21270: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETD_unique.information1 ;
21265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21267: --
21268: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21269: --
21270: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21271: --
21272: -- log_data('ETD',l_new_value,l_prefix || r_ETD_unique.name|| l_suffix,'REUSED');
21266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21267: --
21268: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21269: --
21270: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21271: --
21272: -- log_data('ETD',l_new_value,l_prefix || r_ETD_unique.name|| l_suffix,'REUSED');
21273: --
21274: end if ;
21287: open c_ETD_min_max_dates(r_ETD_unique.table_route_id, r_ETD_unique.information1 ) ;
21288: fetch c_ETD_min_max_dates into l_min_esd,l_max_eed ;
21289: --
21290:
21291: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21292: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21293: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21294: end if;
21295: l_min_esd := greatest(l_min_esd,r_ETD_unique.information2);
21288: fetch c_ETD_min_max_dates into l_min_esd,l_max_eed ;
21289: --
21290:
21291: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21292: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21293: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21294: end if;
21295: l_min_esd := greatest(l_min_esd,r_ETD_unique.information2);
21296: /**********************moved up from here **********************
21289: --
21290:
21291: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21292: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21293: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21294: end if;
21295: l_min_esd := greatest(l_min_esd,r_ETD_unique.information2);
21296: /**********************moved up from here **********************
21297: open c_ETD(r_ETD_unique.table_route_id,
21329: p_from_date => l_min_esd,
21330: p_to_date => l_max_eed );
21331: if l_dt_rec_found THEN
21332: --END TEMPIK
21333: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21334: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21330: p_to_date => l_max_eed );
21331: if l_dt_rec_found THEN
21332: --END TEMPIK
21333: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21334: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21331: if l_dt_rec_found THEN
21332: --END TEMPIK
21333: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21334: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21332: --END TEMPIK
21333: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21334: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21340: --
21333: if r_ETD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21334: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21340: --
21341: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21334: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DPNT_OTHR_PTIP_ID' then
21335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21340: --
21341: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21342: --
21335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD_unique.information1 ;
21337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21340: --
21341: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21342: --
21343: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21340: --
21341: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21342: --
21343: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21344: end if ;
21345: --
21339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21340: --
21341: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21342: --
21343: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21344: end if ;
21345: --
21346: l_object_found_in_target := true ;
21347: --TEMPIK
21375: end if ;
21376: --
21377:
21378: l_effective_date := r_ETD.information2;
21379: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21380: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21381: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21382: end if;
21383:
21376: --
21377:
21378: l_effective_date := r_ETD.information2;
21379: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21380: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21381: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21382: end if;
21383:
21384: if l_first_rec and not l_update then
21377:
21378: l_effective_date := r_ETD.information2;
21379: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21380: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21381: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21382: end if;
21383:
21384: if l_first_rec and not l_update then
21385: -- Call Create routine.
21438: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
21439: -- Update all relevent cer records with new pk_id
21440: hr_utility.set_location('Before plsql table ',222);
21441: hr_utility.set_location('new_value id '||l_elig_dpnt_othr_ptip_id,222);
21442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD.information1 ;
21444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_OTHR_PTIP_ID ;
21445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21439: -- Update all relevent cer records with new pk_id
21440: hr_utility.set_location('Before plsql table ',222);
21441: hr_utility.set_location('new_value id '||l_elig_dpnt_othr_ptip_id,222);
21442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD.information1 ;
21444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_OTHR_PTIP_ID ;
21445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21447: hr_utility.set_location('After plsql table ',222);
21440: hr_utility.set_location('Before plsql table ',222);
21441: hr_utility.set_location('new_value id '||l_elig_dpnt_othr_ptip_id,222);
21442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD.information1 ;
21444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_OTHR_PTIP_ID ;
21445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21447: hr_utility.set_location('After plsql table ',222);
21448: --
21441: hr_utility.set_location('new_value id '||l_elig_dpnt_othr_ptip_id,222);
21442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD.information1 ;
21444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_OTHR_PTIP_ID ;
21445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21447: hr_utility.set_location('After plsql table ',222);
21448: --
21449: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DPNT_OTHR_PTIP_ID' ;
21443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETD.information1 ;
21444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DPNT_OTHR_PTIP_ID ;
21445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21447: hr_utility.set_location('After plsql table ',222);
21448: --
21449: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21450: --
21445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETD_unique.table_route_id;
21447: hr_utility.set_location('After plsql table ',222);
21448: --
21449: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21450: --
21451: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21452: --
21453: else
21447: hr_utility.set_location('After plsql table ',222);
21448: --
21449: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21450: --
21451: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21452: --
21453: else
21454: --
21455: -- Call Update routine for the pk_id created in prev run .
21569: end loop;
21570: --
21571: exception when others then
21572: --
21573: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ETD',r_ETD.information5 ) ;
21574: --
21575: end create_ETD_rows;
21576:
21577: --
21719: end if ;
21720: -- End Prefix Sufix derivation
21721: for r_ECT_unique in c_unique_ECT('ECT') loop
21722:
21723: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21724: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21725: r_ECT_unique.information3 >=
21726: ben_pd_copy_to_ben_one.g_copy_effective_date)
21727: ) then
21720: -- End Prefix Sufix derivation
21721: for r_ECT_unique in c_unique_ECT('ECT') loop
21722:
21723: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21724: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21725: r_ECT_unique.information3 >=
21726: ben_pd_copy_to_ben_one.g_copy_effective_date)
21727: ) then
21728: --
21722:
21723: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21724: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21725: r_ECT_unique.information3 >=
21726: ben_pd_copy_to_ben_one.g_copy_effective_date)
21727: ) then
21728: --
21729: hr_utility.set_location(' r_ECT_unique.table_route_id '||r_ECT_unique.table_route_id,10);
21730: hr_utility.set_location(' r_ECT_unique.information1 '||r_ECT_unique.information1,10);
21762: l_object_found_in_target := TRUE;
21763: --
21764: if l_process_date between r_ECT_unique.information2 and r_ECT_unique.information3 then
21765: l_update := true;
21766: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21767: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECT_unique.information1 ;
21763: --
21764: if l_process_date between r_ECT_unique.information2 and r_ECT_unique.information3 then
21765: l_update := true;
21766: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21767: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECT_unique.information1 ;
21771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21764: if l_process_date between r_ECT_unique.information2 and r_ECT_unique.information3 then
21765: l_update := true;
21766: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21767: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECT_unique.information1 ;
21771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21765: l_update := true;
21766: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21767: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECT_unique.information1 ;
21771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21773: --
21766: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21767: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECT_unique.information1 ;
21771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21773: --
21774: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21767: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECT_unique.information1 ;
21771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21773: --
21774: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21775: --
21768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECT_unique.information1 ;
21771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21773: --
21774: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21775: --
21776: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECT_unique.information1 ;
21771: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21773: --
21774: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21775: --
21776: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21777: --
21778: -- log_data('ECT',l_new_value,l_prefix || r_ECT_unique.name|| l_suffix,'REUSED');
21772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21773: --
21774: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21775: --
21776: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21777: --
21778: -- log_data('ECT',l_new_value,l_prefix || r_ECT_unique.name|| l_suffix,'REUSED');
21779: --
21780: end if ;
21793: open c_ECT_min_max_dates(r_ECT_unique.table_route_id, r_ECT_unique.information1 ) ;
21794: fetch c_ECT_min_max_dates into l_min_esd,l_max_eed ;
21795: --
21796:
21797: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21798: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21799: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21800: end if;
21801: l_min_esd := greatest(l_min_esd,r_ECT_unique.information2);
21794: fetch c_ECT_min_max_dates into l_min_esd,l_max_eed ;
21795: --
21796:
21797: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21798: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21799: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21800: end if;
21801: l_min_esd := greatest(l_min_esd,r_ECT_unique.information2);
21802: /**********************moved up from here **********************
21795: --
21796:
21797: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21798: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21799: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21800: end if;
21801: l_min_esd := greatest(l_min_esd,r_ECT_unique.information2);
21802: /**********************moved up from here **********************
21803: open c_ECT(r_ECT_unique.table_route_id,
21833: p_from_date => l_min_esd,
21834: p_to_date => l_max_eed );
21835: if l_dt_rec_found THEN
21836: --END TEMPIK
21837: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21838: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21834: p_to_date => l_max_eed );
21835: if l_dt_rec_found THEN
21836: --END TEMPIK
21837: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21838: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21835: if l_dt_rec_found THEN
21836: --END TEMPIK
21837: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21838: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21836: --END TEMPIK
21837: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21838: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21844: --
21837: if r_ECT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
21838: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21844: --
21845: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21838: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_CTG_PRTE_ID' then
21839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21844: --
21845: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21846: --
21839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT_unique.information1 ;
21841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21844: --
21845: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21846: --
21847: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21844: --
21845: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21846: --
21847: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21848: end if ;
21849: --
21843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21844: --
21845: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21846: --
21847: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21848: end if ;
21849: --
21850: l_object_found_in_target := true ;
21851: --TEMPIK
21879: end if ;
21880: --
21881:
21882: l_effective_date := r_ECT.information2;
21883: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21884: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21885: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21886: end if;
21887:
21880: --
21881:
21882: l_effective_date := r_ECT.information2;
21883: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21884: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21885: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21886: end if;
21887:
21888: if l_first_rec and not l_update then
21881:
21882: l_effective_date := r_ECT.information2;
21883: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21884: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21885: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21886: end if;
21887:
21888: if l_first_rec and not l_update then
21889: -- Call Create routine.
21944: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
21945: -- Update all relevent cer records with new pk_id
21946: hr_utility.set_location('Before plsql table ',222);
21947: hr_utility.set_location('new_value id '||l_elig_dsblty_ctg_prte_id,222);
21948: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT.information1 ;
21950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_CTG_PRTE_ID ;
21951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21945: -- Update all relevent cer records with new pk_id
21946: hr_utility.set_location('Before plsql table ',222);
21947: hr_utility.set_location('new_value id '||l_elig_dsblty_ctg_prte_id,222);
21948: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT.information1 ;
21950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_CTG_PRTE_ID ;
21951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21953: hr_utility.set_location('After plsql table ',222);
21946: hr_utility.set_location('Before plsql table ',222);
21947: hr_utility.set_location('new_value id '||l_elig_dsblty_ctg_prte_id,222);
21948: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT.information1 ;
21950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_CTG_PRTE_ID ;
21951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21953: hr_utility.set_location('After plsql table ',222);
21954: --
21947: hr_utility.set_location('new_value id '||l_elig_dsblty_ctg_prte_id,222);
21948: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT.information1 ;
21950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_CTG_PRTE_ID ;
21951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21953: hr_utility.set_location('After plsql table ',222);
21954: --
21955: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21948: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_CTG_PRTE_ID' ;
21949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECT.information1 ;
21950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_CTG_PRTE_ID ;
21951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21953: hr_utility.set_location('After plsql table ',222);
21954: --
21955: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21956: --
21951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECT_unique.table_route_id;
21953: hr_utility.set_location('After plsql table ',222);
21954: --
21955: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21956: --
21957: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21958: --
21959: else
21953: hr_utility.set_location('After plsql table ',222);
21954: --
21955: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21956: --
21957: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21958: --
21959: else
21960: --
21961: -- Call Update routine for the pk_id created in prev run .
22074: end loop;
22075: --
22076: exception when others then
22077: --
22078: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ECT',r_ECT.information5 ) ;
22079: --
22080: end create_ECT_rows;
22081:
22082: ---------------------------------------------------------------
22225: end if ;
22226: -- End Prefix Sufix derivation
22227: for r_EDD_unique in c_unique_EDD('EDD') loop
22228:
22229: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
22230: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22231: r_EDD_unique.information3 >=
22232: ben_pd_copy_to_ben_one.g_copy_effective_date)
22233: ) then
22226: -- End Prefix Sufix derivation
22227: for r_EDD_unique in c_unique_EDD('EDD') loop
22228:
22229: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
22230: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22231: r_EDD_unique.information3 >=
22232: ben_pd_copy_to_ben_one.g_copy_effective_date)
22233: ) then
22234: --
22228:
22229: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
22230: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22231: r_EDD_unique.information3 >=
22232: ben_pd_copy_to_ben_one.g_copy_effective_date)
22233: ) then
22234: --
22235: hr_utility.set_location(' r_EDD_unique.table_route_id '||r_EDD_unique.table_route_id,10);
22236: hr_utility.set_location(' r_EDD_unique.information1 '||r_EDD_unique.information1,10);
22269: l_object_found_in_target := TRUE;
22270: --
22271: if l_process_date between r_EDD_unique.information2 and r_EDD_unique.information3 then
22272: l_update := true;
22273: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDD_unique.information1 ;
22270: --
22271: if l_process_date between r_EDD_unique.information2 and r_EDD_unique.information3 then
22272: l_update := true;
22273: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDD_unique.information1 ;
22278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22271: if l_process_date between r_EDD_unique.information2 and r_EDD_unique.information3 then
22272: l_update := true;
22273: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDD_unique.information1 ;
22278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22272: l_update := true;
22273: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDD_unique.information1 ;
22278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22280: --
22273: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDD_unique.information1 ;
22278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22280: --
22281: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDD_unique.information1 ;
22278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22280: --
22281: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22282: --
22275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDD_unique.information1 ;
22278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22280: --
22281: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22282: --
22283: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDD_unique.information1 ;
22278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22280: --
22281: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22282: --
22283: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22284: --
22285: -- log_data('EDD',l_new_value,l_prefix || r_EDD_unique.name|| l_suffix,'REUSED');
22279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22280: --
22281: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22282: --
22283: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22284: --
22285: -- log_data('EDD',l_new_value,l_prefix || r_EDD_unique.name|| l_suffix,'REUSED');
22286: --
22287: end if ;
22300: open c_EDD_min_max_dates(r_EDD_unique.table_route_id, r_EDD_unique.information1 ) ;
22301: fetch c_EDD_min_max_dates into l_min_esd,l_max_eed ;
22302: --
22303:
22304: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22305: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22306: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
22307: end if;
22308: l_min_esd := greatest(l_min_esd,r_EDD_unique.information2);
22301: fetch c_EDD_min_max_dates into l_min_esd,l_max_eed ;
22302: --
22303:
22304: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22305: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22306: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
22307: end if;
22308: l_min_esd := greatest(l_min_esd,r_EDD_unique.information2);
22309: /**********************moved up from here **********************
22302: --
22303:
22304: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22305: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22306: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
22307: end if;
22308: l_min_esd := greatest(l_min_esd,r_EDD_unique.information2);
22309: /**********************moved up from here **********************
22310: open c_EDD(r_EDD_unique.table_route_id,
22341: p_from_date => l_min_esd,
22342: p_to_date => l_max_eed );
22343: if l_dt_rec_found THEN
22344: --END TEMPIK
22345: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22342: p_to_date => l_max_eed );
22343: if l_dt_rec_found THEN
22344: --END TEMPIK
22345: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22343: if l_dt_rec_found THEN
22344: --END TEMPIK
22345: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22344: --END TEMPIK
22345: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22352: --
22345: if r_EDD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22352: --
22353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_DGR_PRTE_ID' then
22347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22352: --
22353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22354: --
22347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD_unique.information1 ;
22349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22352: --
22353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22354: --
22355: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22352: --
22353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22354: --
22355: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22356: end if ;
22357: --
22351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22352: --
22353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22354: --
22355: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22356: end if ;
22357: --
22358: l_object_found_in_target := true ;
22359: --TEMPIK
22387: end if ;
22388: --
22389:
22390: l_effective_date := r_EDD.information2;
22391: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22392: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22393: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22394: end if;
22395:
22388: --
22389:
22390: l_effective_date := r_EDD.information2;
22391: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22392: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22393: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22394: end if;
22395:
22396: if l_first_rec and not l_update then
22389:
22390: l_effective_date := r_EDD.information2;
22391: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22392: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22393: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22394: end if;
22395:
22396: if l_first_rec and not l_update then
22397: -- Call Create routine.
22452: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
22453: -- Update all relevent cer records with new pk_id
22454: hr_utility.set_location('Before plsql table ',222);
22455: hr_utility.set_location('new_value id '||l_elig_dsblty_dgr_prte_id,222);
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD.information1 ;
22458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_DGR_PRTE_ID ;
22459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22453: -- Update all relevent cer records with new pk_id
22454: hr_utility.set_location('Before plsql table ',222);
22455: hr_utility.set_location('new_value id '||l_elig_dsblty_dgr_prte_id,222);
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD.information1 ;
22458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_DGR_PRTE_ID ;
22459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22461: hr_utility.set_location('After plsql table ',222);
22454: hr_utility.set_location('Before plsql table ',222);
22455: hr_utility.set_location('new_value id '||l_elig_dsblty_dgr_prte_id,222);
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD.information1 ;
22458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_DGR_PRTE_ID ;
22459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22461: hr_utility.set_location('After plsql table ',222);
22462: --
22455: hr_utility.set_location('new_value id '||l_elig_dsblty_dgr_prte_id,222);
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD.information1 ;
22458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_DGR_PRTE_ID ;
22459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22461: hr_utility.set_location('After plsql table ',222);
22462: --
22463: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_DGR_PRTE_ID' ;
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDD.information1 ;
22458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_DGR_PRTE_ID ;
22459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22461: hr_utility.set_location('After plsql table ',222);
22462: --
22463: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22464: --
22459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDD_unique.table_route_id;
22461: hr_utility.set_location('After plsql table ',222);
22462: --
22463: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22464: --
22465: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22466: --
22467: else
22461: hr_utility.set_location('After plsql table ',222);
22462: --
22463: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22464: --
22465: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22466: --
22467: else
22468: --
22469: -- Call Update routine for the pk_id created in prev run .
22582: end loop;
22583: --
22584: exception when others then
22585: --
22586: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EDD',r_EDD.information5 ) ;
22587: --
22588: end create_EDD_rows;
22589:
22590: --
22737: end if ;
22738: -- End Prefix Sufix derivation
22739: for r_EDR_unique in c_unique_EDR('EDR') loop
22740:
22741: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
22742: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22743: r_EDR_unique.information3 >=
22744: ben_pd_copy_to_ben_one.g_copy_effective_date)
22745: ) then
22738: -- End Prefix Sufix derivation
22739: for r_EDR_unique in c_unique_EDR('EDR') loop
22740:
22741: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
22742: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22743: r_EDR_unique.information3 >=
22744: ben_pd_copy_to_ben_one.g_copy_effective_date)
22745: ) then
22746: --
22740:
22741: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
22742: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22743: r_EDR_unique.information3 >=
22744: ben_pd_copy_to_ben_one.g_copy_effective_date)
22745: ) then
22746: --
22747: hr_utility.set_location(' r_EDR_unique.table_route_id '||r_EDR_unique.table_route_id,10);
22748: hr_utility.set_location(' r_EDR_unique.information1 '||r_EDR_unique.information1,10);
22791: l_object_found_in_target := TRUE;
22792: --
22793: if l_process_date between r_EDR_unique.information2 and r_EDR_unique.information3 then
22794: l_update := true;
22795: if r_EDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22796: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDR_unique.information1 ;
22792: --
22793: if l_process_date between r_EDR_unique.information2 and r_EDR_unique.information3 then
22794: l_update := true;
22795: if r_EDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22796: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDR_unique.information1 ;
22800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22793: if l_process_date between r_EDR_unique.information2 and r_EDR_unique.information3 then
22794: l_update := true;
22795: if r_EDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22796: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDR_unique.information1 ;
22800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22794: l_update := true;
22795: if r_EDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22796: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDR_unique.information1 ;
22800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22802: --
22795: if r_EDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22796: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDR_unique.information1 ;
22800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22802: --
22803: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22796: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDR_unique.information1 ;
22800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22802: --
22803: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22804: --
22797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDR_unique.information1 ;
22800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22802: --
22803: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22804: --
22805: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDR_unique.information1 ;
22800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22802: --
22803: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22804: --
22805: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22806: --
22807: -- log_data('EDR',l_new_value,l_prefix || r_EDR_unique.name|| l_suffix,'REUSED');
22801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22802: --
22803: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22804: --
22805: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22806: --
22807: -- log_data('EDR',l_new_value,l_prefix || r_EDR_unique.name|| l_suffix,'REUSED');
22808: --
22809: end if ;
22825: open c_EDR_min_max_dates(r_EDR_unique.table_route_id, r_EDR_unique.information1 ) ;
22826: fetch c_EDR_min_max_dates into l_min_esd,l_max_eed ;
22827: --
22828:
22829: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22830: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22831:
22832: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
22833: end if;
22826: fetch c_EDR_min_max_dates into l_min_esd,l_max_eed ;
22827: --
22828:
22829: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22830: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22831:
22832: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
22833: end if;
22834: l_min_esd := greatest(l_min_esd,r_EDR_unique.information2);
22828:
22829: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22830: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22831:
22832: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
22833: end if;
22834: l_min_esd := greatest(l_min_esd,r_EDR_unique.information2);
22835: /**********************moved up from here **********************
22836: open c_EDR(r_EDR_unique.table_route_id,
22869: p_from_date => l_min_esd,
22870: p_to_date => l_max_eed );
22871: if l_dt_rec_found THEN
22872: --END TEMPIK
22873: if r_EDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22874: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22875:
22876:
22877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22870: p_to_date => l_max_eed );
22871: if l_dt_rec_found THEN
22872: --END TEMPIK
22873: if r_EDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22874: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22875:
22876:
22877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22873: if r_EDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
22874: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22875:
22876:
22877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22874: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLTY_RSN_PRTE_ID' then
22875:
22876:
22877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22882:
22875:
22876:
22877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22882:
22883: --
22876:
22877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22882:
22883: --
22884: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR_unique.information1 ;
22879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22882:
22883: --
22884: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22885: --
22880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22882:
22883: --
22884: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22885: --
22886: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22887: end if ;
22888: --
22882:
22883: --
22884: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22885: --
22886: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22887: end if ;
22888: --
22889: l_object_found_in_target := true ;
22890:
22919: end if ;
22920: --
22921:
22922: l_effective_date := r_EDR.information2;
22923: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22924: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22925: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22926: end if;
22927:
22920: --
22921:
22922: l_effective_date := r_EDR.information2;
22923: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22924: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22925: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22926: end if;
22927:
22928: if l_first_rec and not l_update then
22921:
22922: l_effective_date := r_EDR.information2;
22923: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22924: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22925: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22926: end if;
22927:
22928: if l_first_rec and not l_update then
22929: -- Call Create routine.
22983: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
22984: -- Update all relevent cer records with new pk_id
22985: hr_utility.set_location('Before plsql table ',222);
22986: hr_utility.set_location('new_value id '||l_elig_dsblty_rsn_prte_id,222);
22987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR.information1 ;
22989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_RSN_PRTE_ID ;
22990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22984: -- Update all relevent cer records with new pk_id
22985: hr_utility.set_location('Before plsql table ',222);
22986: hr_utility.set_location('new_value id '||l_elig_dsblty_rsn_prte_id,222);
22987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR.information1 ;
22989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_RSN_PRTE_ID ;
22990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22992: hr_utility.set_location('After plsql table ',222);
22985: hr_utility.set_location('Before plsql table ',222);
22986: hr_utility.set_location('new_value id '||l_elig_dsblty_rsn_prte_id,222);
22987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR.information1 ;
22989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_RSN_PRTE_ID ;
22990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22992: hr_utility.set_location('After plsql table ',222);
22993: --
22986: hr_utility.set_location('new_value id '||l_elig_dsblty_rsn_prte_id,222);
22987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR.information1 ;
22989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_RSN_PRTE_ID ;
22990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22992: hr_utility.set_location('After plsql table ',222);
22993: --
22994: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLTY_RSN_PRTE_ID' ;
22988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDR.information1 ;
22989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLTY_RSN_PRTE_ID ;
22990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22992: hr_utility.set_location('After plsql table ',222);
22993: --
22994: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22995: --
22990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22991: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDR_unique.table_route_id;
22992: hr_utility.set_location('After plsql table ',222);
22993: --
22994: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22995: --
22996: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22997: --
22998: else
22992: hr_utility.set_location('After plsql table ',222);
22993: --
22994: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22995: --
22996: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22997: --
22998: else
22999: --
23000: -- Call Update routine for the pk_id created in prev run .
23113: --
23114: exception when others then
23115: --
23116:
23117: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EDR',r_EDR.information5 ) ;
23118: --
23119: end create_EDR_rows;
23120:
23121: ---------------------------------------------------------------
23253: end if ;
23254: -- End Prefix Sufix derivation
23255: for r_EES_unique in c_unique_EES('EES') loop
23256:
23257: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23258: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23259: r_EES_unique.information3 >=
23260: ben_pd_copy_to_ben_one.g_copy_effective_date)
23261: ) then
23254: -- End Prefix Sufix derivation
23255: for r_EES_unique in c_unique_EES('EES') loop
23256:
23257: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23258: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23259: r_EES_unique.information3 >=
23260: ben_pd_copy_to_ben_one.g_copy_effective_date)
23261: ) then
23262: --
23256:
23257: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23258: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23259: r_EES_unique.information3 >=
23260: ben_pd_copy_to_ben_one.g_copy_effective_date)
23261: ) then
23262: --
23263: hr_utility.set_location(' r_EES_unique.table_route_id '||r_EES_unique.table_route_id,10);
23264: hr_utility.set_location(' r_EES_unique.information1 '||r_EES_unique.information1,10);
23283: fetch c_EES into r_EES ;
23284: --
23285: close c_EES ;
23286: --
23287: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
23288: l_ASSIGNMENT_STATUS_TYPE_ID := r_EES.information176;
23289: else
23290: l_ASSIGNMENT_STATUS_TYPE_ID := r_EES.information174;
23291: end if;
23297: l_object_found_in_target := TRUE;
23298: --
23299: if l_process_date between r_EES_unique.information2 and r_EES_unique.information3 then
23300: l_update := true;
23301: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23302: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23303: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EES_unique.information1 ;
23298: --
23299: if l_process_date between r_EES_unique.information2 and r_EES_unique.information3 then
23300: l_update := true;
23301: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23302: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23303: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EES_unique.information1 ;
23306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23299: if l_process_date between r_EES_unique.information2 and r_EES_unique.information3 then
23300: l_update := true;
23301: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23302: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23303: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EES_unique.information1 ;
23306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23300: l_update := true;
23301: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23302: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23303: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EES_unique.information1 ;
23306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23308: --
23301: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23302: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23303: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EES_unique.information1 ;
23306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23308: --
23309: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23302: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23303: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EES_unique.information1 ;
23306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23308: --
23309: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23310: --
23303: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EES_unique.information1 ;
23306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23308: --
23309: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23310: --
23311: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EES_unique.information1 ;
23306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23308: --
23309: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23310: --
23311: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23312: --
23313: -- log_data('EES',l_new_value,l_prefix || r_EES_unique.name|| l_suffix,'REUSED');
23307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23308: --
23309: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23310: --
23311: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23312: --
23313: -- log_data('EES',l_new_value,l_prefix || r_EES_unique.name|| l_suffix,'REUSED');
23314: --
23315: end if ;
23328: open c_EES_min_max_dates(r_EES_unique.table_route_id, r_EES_unique.information1 ) ;
23329: fetch c_EES_min_max_dates into l_min_esd,l_max_eed ;
23330: --
23331:
23332: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23333: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23334: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23335: end if;
23336: l_min_esd := greatest(l_min_esd,r_EES_unique.information2);
23329: fetch c_EES_min_max_dates into l_min_esd,l_max_eed ;
23330: --
23331:
23332: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23333: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23334: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23335: end if;
23336: l_min_esd := greatest(l_min_esd,r_EES_unique.information2);
23337: /**********************moved up from here **********************
23330: --
23331:
23332: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23333: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23334: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23335: end if;
23336: l_min_esd := greatest(l_min_esd,r_EES_unique.information2);
23337: /**********************moved up from here **********************
23338: open c_EES(r_EES_unique.table_route_id,
23343: fetch c_EES into r_EES ;
23344: --
23345: close c_EES ;
23346: --
23347: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
23348: l_ASSIGNMENT_STATUS_TYPE_ID := r_EES.information176;
23349: else
23350: l_ASSIGNMENT_STATUS_TYPE_ID := r_EES.information174;
23351: end if;
23380: p_from_date => l_min_esd,
23381: p_to_date => l_max_eed );
23382: if l_dt_rec_found THEN
23383: --END TEMPIK
23384: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23385: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23381: p_to_date => l_max_eed );
23382: if l_dt_rec_found THEN
23383: --END TEMPIK
23384: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23385: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23382: if l_dt_rec_found THEN
23383: --END TEMPIK
23384: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23385: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23383: --END TEMPIK
23384: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23385: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23391: --
23384: if r_EES_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23385: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23391: --
23392: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23385: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_EE_STAT_PRTE_ID' then
23386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23391: --
23392: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23393: --
23386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES_unique.information1 ;
23388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23391: --
23392: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23393: --
23394: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23391: --
23392: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23393: --
23394: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23395: end if ;
23396: --
23390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23391: --
23392: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23393: --
23394: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23395: end if ;
23396: --
23397: l_object_found_in_target := true ;
23398: --TEMPIK
23429: end if ;
23430: --
23431:
23432: l_effective_date := r_EES.information2;
23433: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23434: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23435: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23436: end if;
23437:
23430: --
23431:
23432: l_effective_date := r_EES.information2;
23433: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23434: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23435: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23436: end if;
23437:
23438: if l_first_rec and not l_update then
23431:
23432: l_effective_date := r_EES.information2;
23433: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23434: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23435: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23436: end if;
23437:
23438: if l_first_rec and not l_update then
23439: -- Call Create routine.
23494: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
23495: -- Update all relevent cer records with new pk_id
23496: hr_utility.set_location('Before plsql table ',222);
23497: hr_utility.set_location('new_value id '||l_elig_ee_stat_prte_id,222);
23498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES.information1 ;
23500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_EE_STAT_PRTE_ID ;
23501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23495: -- Update all relevent cer records with new pk_id
23496: hr_utility.set_location('Before plsql table ',222);
23497: hr_utility.set_location('new_value id '||l_elig_ee_stat_prte_id,222);
23498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES.information1 ;
23500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_EE_STAT_PRTE_ID ;
23501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23503: hr_utility.set_location('After plsql table ',222);
23496: hr_utility.set_location('Before plsql table ',222);
23497: hr_utility.set_location('new_value id '||l_elig_ee_stat_prte_id,222);
23498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES.information1 ;
23500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_EE_STAT_PRTE_ID ;
23501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23503: hr_utility.set_location('After plsql table ',222);
23504: --
23497: hr_utility.set_location('new_value id '||l_elig_ee_stat_prte_id,222);
23498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES.information1 ;
23500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_EE_STAT_PRTE_ID ;
23501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23503: hr_utility.set_location('After plsql table ',222);
23504: --
23505: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_EE_STAT_PRTE_ID' ;
23499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EES.information1 ;
23500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_EE_STAT_PRTE_ID ;
23501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23503: hr_utility.set_location('After plsql table ',222);
23504: --
23505: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23506: --
23501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EES_unique.table_route_id;
23503: hr_utility.set_location('After plsql table ',222);
23504: --
23505: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23506: --
23507: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23508: --
23509: else
23503: hr_utility.set_location('After plsql table ',222);
23504: --
23505: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23506: --
23507: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23508: --
23509: else
23510: --
23511: -- Call Update routine for the pk_id created in prev run .
23626: end loop;
23627: --
23628: exception when others then
23629: --
23630: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EES',r_EES.information5 ) ;
23631: --
23632: end create_EES_rows;
23633:
23634: --
23767: end if ;
23768: -- End Prefix Sufix derivation
23769: for r_EEI_unique in c_unique_EEI('EEI') loop
23770:
23771: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23772: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23773: r_EEI_unique.information3 >=
23774: ben_pd_copy_to_ben_one.g_copy_effective_date)
23775: ) then
23768: -- End Prefix Sufix derivation
23769: for r_EEI_unique in c_unique_EEI('EEI') loop
23770:
23771: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23772: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23773: r_EEI_unique.information3 >=
23774: ben_pd_copy_to_ben_one.g_copy_effective_date)
23775: ) then
23776: --
23770:
23771: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23772: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23773: r_EEI_unique.information3 >=
23774: ben_pd_copy_to_ben_one.g_copy_effective_date)
23775: ) then
23776: --
23777: hr_utility.set_location(' r_EEI_unique.table_route_id '||r_EEI_unique.table_route_id,10);
23778: hr_utility.set_location(' r_EEI_unique.information1 '||r_EEI_unique.information1,10);
23810: l_object_found_in_target := TRUE;
23811: --
23812: if l_process_date between r_EEI_unique.information2 and r_EEI_unique.information3 then
23813: l_update := true;
23814: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23815: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEI_unique.information1 ;
23811: --
23812: if l_process_date between r_EEI_unique.information2 and r_EEI_unique.information3 then
23813: l_update := true;
23814: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23815: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEI_unique.information1 ;
23819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23812: if l_process_date between r_EEI_unique.information2 and r_EEI_unique.information3 then
23813: l_update := true;
23814: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23815: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEI_unique.information1 ;
23819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23813: l_update := true;
23814: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23815: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEI_unique.information1 ;
23819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23821: --
23814: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23815: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEI_unique.information1 ;
23819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23821: --
23822: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23815: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEI_unique.information1 ;
23819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23821: --
23822: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23823: --
23816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEI_unique.information1 ;
23819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23821: --
23822: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23823: --
23824: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEI_unique.information1 ;
23819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23821: --
23822: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23823: --
23824: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23825: --
23826: -- log_data('EEI',l_new_value,l_prefix || r_EEI_unique.name|| l_suffix,'REUSED');
23820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23821: --
23822: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23823: --
23824: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23825: --
23826: -- log_data('EEI',l_new_value,l_prefix || r_EEI_unique.name|| l_suffix,'REUSED');
23827: --
23828: end if ;
23841: open c_EEI_min_max_dates(r_EEI_unique.table_route_id, r_EEI_unique.information1 ) ;
23842: fetch c_EEI_min_max_dates into l_min_esd,l_max_eed ;
23843: --
23844:
23845: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23846: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23847: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23848: end if;
23849: l_min_esd := greatest(l_min_esd,r_EEI_unique.information2);
23842: fetch c_EEI_min_max_dates into l_min_esd,l_max_eed ;
23843: --
23844:
23845: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23846: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23847: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23848: end if;
23849: l_min_esd := greatest(l_min_esd,r_EEI_unique.information2);
23850: /**********************moved up from here **********************
23843: --
23844:
23845: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23846: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23847: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23848: end if;
23849: l_min_esd := greatest(l_min_esd,r_EEI_unique.information2);
23850: /**********************moved up from here **********************
23851: open c_EEI(r_EEI_unique.table_route_id,
23881: p_from_date => l_min_esd,
23882: p_to_date => l_max_eed );
23883: if l_dt_rec_found THEN
23884: --END TEMPIK
23885: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23886: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23887: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23888: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23882: p_to_date => l_max_eed );
23883: if l_dt_rec_found THEN
23884: --END TEMPIK
23885: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23886: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23887: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23888: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23883: if l_dt_rec_found THEN
23884: --END TEMPIK
23885: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23886: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23887: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23888: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23884: --END TEMPIK
23885: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23886: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23887: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23888: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23892: --
23885: if r_EEI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
23886: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23887: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23888: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23892: --
23893: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23886: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_OIPL_ID' then
23887: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23888: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23892: --
23893: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23894: --
23887: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23888: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI_unique.information1 ;
23889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23892: --
23893: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23894: --
23895: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23892: --
23893: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23894: --
23895: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23896: end if ;
23897: --
23891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23892: --
23893: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23894: --
23895: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23896: end if ;
23897: --
23898: l_object_found_in_target := true ;
23899: --TEMPIK
23927: end if ;
23928: --
23929:
23930: l_effective_date := r_EEI.information2;
23931: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23932: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23933: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23934: end if;
23935:
23928: --
23929:
23930: l_effective_date := r_EEI.information2;
23931: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23932: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23933: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23934: end if;
23935:
23936: if l_first_rec and not l_update then
23929:
23930: l_effective_date := r_EEI.information2;
23931: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23932: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23933: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23934: end if;
23935:
23936: if l_first_rec and not l_update then
23937: -- Call Create routine.
23991: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
23992: -- Update all relevent cer records with new pk_id
23993: hr_utility.set_location('Before plsql table ',222);
23994: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_oipl_id,222);
23995: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23996: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI.information1 ;
23997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_OIPL_ID ;
23998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
23992: -- Update all relevent cer records with new pk_id
23993: hr_utility.set_location('Before plsql table ',222);
23994: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_oipl_id,222);
23995: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23996: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI.information1 ;
23997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_OIPL_ID ;
23998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
24000: hr_utility.set_location('After plsql table ',222);
23993: hr_utility.set_location('Before plsql table ',222);
23994: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_oipl_id,222);
23995: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23996: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI.information1 ;
23997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_OIPL_ID ;
23998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
24000: hr_utility.set_location('After plsql table ',222);
24001: --
23994: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_oipl_id,222);
23995: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23996: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI.information1 ;
23997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_OIPL_ID ;
23998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
24000: hr_utility.set_location('After plsql table ',222);
24001: --
24002: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23995: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_OIPL_ID' ;
23996: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEI.information1 ;
23997: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_OIPL_ID ;
23998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
24000: hr_utility.set_location('After plsql table ',222);
24001: --
24002: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24003: --
23998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEI_unique.table_route_id;
24000: hr_utility.set_location('After plsql table ',222);
24001: --
24002: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24003: --
24004: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24005: --
24006: else
24000: hr_utility.set_location('After plsql table ',222);
24001: --
24002: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24003: --
24004: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24005: --
24006: else
24007: --
24008: -- Call Update routine for the pk_id created in prev run .
24120: end loop;
24121: --
24122: exception when others then
24123: --
24124: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EEI',r_EEI.information5 ) ;
24125: --
24126: end create_EEI_rows;
24127:
24128: --
24261: end if ;
24262: -- End Prefix Sufix derivation
24263: for r_EEG_unique in c_unique_EEG('EEG') loop
24264:
24265: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24266: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24267: r_EEG_unique.information3 >=
24268: ben_pd_copy_to_ben_one.g_copy_effective_date)
24269: ) then
24262: -- End Prefix Sufix derivation
24263: for r_EEG_unique in c_unique_EEG('EEG') loop
24264:
24265: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24266: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24267: r_EEG_unique.information3 >=
24268: ben_pd_copy_to_ben_one.g_copy_effective_date)
24269: ) then
24270: --
24264:
24265: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24266: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24267: r_EEG_unique.information3 >=
24268: ben_pd_copy_to_ben_one.g_copy_effective_date)
24269: ) then
24270: --
24271: hr_utility.set_location(' r_EEG_unique.table_route_id '||r_EEG_unique.table_route_id,10);
24272: hr_utility.set_location(' r_EEG_unique.information1 '||r_EEG_unique.information1,10);
24304: l_object_found_in_target := TRUE;
24305: --
24306: if l_process_date between r_EEG_unique.information2 and r_EEG_unique.information3 then
24307: l_update := true;
24308: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEG_unique.information1 ;
24305: --
24306: if l_process_date between r_EEG_unique.information2 and r_EEG_unique.information3 then
24307: l_update := true;
24308: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEG_unique.information1 ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24306: if l_process_date between r_EEG_unique.information2 and r_EEG_unique.information3 then
24307: l_update := true;
24308: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEG_unique.information1 ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24307: l_update := true;
24308: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEG_unique.information1 ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24315: --
24308: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEG_unique.information1 ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24315: --
24316: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24309: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEG_unique.information1 ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24315: --
24316: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24317: --
24310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEG_unique.information1 ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24315: --
24316: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24317: --
24318: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEG_unique.information1 ;
24313: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24315: --
24316: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24317: --
24318: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24319: --
24320: -- log_data('EEG',l_new_value,l_prefix || r_EEG_unique.name|| l_suffix,'REUSED');
24314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24315: --
24316: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24317: --
24318: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24319: --
24320: -- log_data('EEG',l_new_value,l_prefix || r_EEG_unique.name|| l_suffix,'REUSED');
24321: --
24322: end if ;
24335: open c_EEG_min_max_dates(r_EEG_unique.table_route_id, r_EEG_unique.information1 ) ;
24336: fetch c_EEG_min_max_dates into l_min_esd,l_max_eed ;
24337: --
24338:
24339: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24340: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24341: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24342: end if;
24343: l_min_esd := greatest(l_min_esd,r_EEG_unique.information2);
24336: fetch c_EEG_min_max_dates into l_min_esd,l_max_eed ;
24337: --
24338:
24339: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24340: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24341: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24342: end if;
24343: l_min_esd := greatest(l_min_esd,r_EEG_unique.information2);
24344: /**********************moved up from here **********************
24337: --
24338:
24339: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24340: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24341: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24342: end if;
24343: l_min_esd := greatest(l_min_esd,r_EEG_unique.information2);
24344: /**********************moved up from here **********************
24345: open c_EEG(r_EEG_unique.table_route_id,
24375: p_from_date => l_min_esd,
24376: p_to_date => l_max_eed );
24377: if l_dt_rec_found THEN
24378: --END TEMPIK
24379: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24380: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24376: p_to_date => l_max_eed );
24377: if l_dt_rec_found THEN
24378: --END TEMPIK
24379: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24380: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24377: if l_dt_rec_found THEN
24378: --END TEMPIK
24379: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24380: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24378: --END TEMPIK
24379: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24380: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24386: --
24379: if r_EEG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24380: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24386: --
24387: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24380: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PGM_ID' then
24381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24386: --
24387: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24388: --
24381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG_unique.information1 ;
24383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24386: --
24387: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24388: --
24389: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24383: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24386: --
24387: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24388: --
24389: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24390: end if ;
24391: --
24385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24386: --
24387: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24388: --
24389: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24390: end if ;
24391: --
24392: l_object_found_in_target := true ;
24393: --TEMPIK
24421: end if ;
24422: --
24423:
24424: l_effective_date := r_EEG.information2;
24425: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24426: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24427: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24428: end if;
24429:
24422: --
24423:
24424: l_effective_date := r_EEG.information2;
24425: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24426: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24427: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24428: end if;
24429:
24430: if l_first_rec and not l_update then
24423:
24424: l_effective_date := r_EEG.information2;
24425: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24426: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24427: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24428: end if;
24429:
24430: if l_first_rec and not l_update then
24431: -- Call Create routine.
24485: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
24486: -- Update all relevent cer records with new pk_id
24487: hr_utility.set_location('Before plsql table ',222);
24488: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_pgm_id,222);
24489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG.information1 ;
24491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PGM_ID ;
24492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24486: -- Update all relevent cer records with new pk_id
24487: hr_utility.set_location('Before plsql table ',222);
24488: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_pgm_id,222);
24489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG.information1 ;
24491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PGM_ID ;
24492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24494: hr_utility.set_location('After plsql table ',222);
24487: hr_utility.set_location('Before plsql table ',222);
24488: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_pgm_id,222);
24489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG.information1 ;
24491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PGM_ID ;
24492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24494: hr_utility.set_location('After plsql table ',222);
24495: --
24488: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_pgm_id,222);
24489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG.information1 ;
24491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PGM_ID ;
24492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24494: hr_utility.set_location('After plsql table ',222);
24495: --
24496: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PGM_ID' ;
24490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEG.information1 ;
24491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PGM_ID ;
24492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24494: hr_utility.set_location('After plsql table ',222);
24495: --
24496: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24497: --
24492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEG_unique.table_route_id;
24494: hr_utility.set_location('After plsql table ',222);
24495: --
24496: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24497: --
24498: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24499: --
24500: else
24494: hr_utility.set_location('After plsql table ',222);
24495: --
24496: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24497: --
24498: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24499: --
24500: else
24501: --
24502: -- Call Update routine for the pk_id created in prev run .
24614: end loop;
24615: --
24616: exception when others then
24617: --
24618: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EEG',r_EEG.information5 ) ;
24619: --
24620: end create_EEG_rows;
24621:
24622: --
24755: end if ;
24756: -- End Prefix Sufix derivation
24757: for r_EAI_unique in c_unique_EAI('EAI') loop
24758:
24759: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24760: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24761: r_EAI_unique.information3 >=
24762: ben_pd_copy_to_ben_one.g_copy_effective_date)
24763: ) then
24756: -- End Prefix Sufix derivation
24757: for r_EAI_unique in c_unique_EAI('EAI') loop
24758:
24759: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24760: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24761: r_EAI_unique.information3 >=
24762: ben_pd_copy_to_ben_one.g_copy_effective_date)
24763: ) then
24764: --
24758:
24759: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24760: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24761: r_EAI_unique.information3 >=
24762: ben_pd_copy_to_ben_one.g_copy_effective_date)
24763: ) then
24764: --
24765: hr_utility.set_location(' r_EAI_unique.table_route_id '||r_EAI_unique.table_route_id,10);
24766: hr_utility.set_location(' r_EAI_unique.information1 '||r_EAI_unique.information1,10);
24798: l_object_found_in_target := TRUE;
24799: --
24800: if l_process_date between r_EAI_unique.information2 and r_EAI_unique.information3 then
24801: l_update := true;
24802: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAI_unique.information1 ;
24799: --
24800: if l_process_date between r_EAI_unique.information2 and r_EAI_unique.information3 then
24801: l_update := true;
24802: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAI_unique.information1 ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24800: if l_process_date between r_EAI_unique.information2 and r_EAI_unique.information3 then
24801: l_update := true;
24802: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAI_unique.information1 ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24801: l_update := true;
24802: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAI_unique.information1 ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24809: --
24802: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAI_unique.information1 ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAI_unique.information1 ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24811: --
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAI_unique.information1 ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24811: --
24812: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAI_unique.information1 ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( 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: -- log_data('EAI',l_new_value,l_prefix || r_EAI_unique.name|| l_suffix,'REUSED');
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( 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: -- log_data('EAI',l_new_value,l_prefix || r_EAI_unique.name|| l_suffix,'REUSED');
24815: --
24816: end if ;
24829: open c_EAI_min_max_dates(r_EAI_unique.table_route_id, r_EAI_unique.information1 ) ;
24830: fetch c_EAI_min_max_dates into l_min_esd,l_max_eed ;
24831: --
24832:
24833: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24834: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24835: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24836: end if;
24837: l_min_esd := greatest(l_min_esd,r_EAI_unique.information2);
24830: fetch c_EAI_min_max_dates into l_min_esd,l_max_eed ;
24831: --
24832:
24833: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24834: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24835: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24836: end if;
24837: l_min_esd := greatest(l_min_esd,r_EAI_unique.information2);
24838: /**********************moved up from here **********************
24831: --
24832:
24833: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24834: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24835: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24836: end if;
24837: l_min_esd := greatest(l_min_esd,r_EAI_unique.information2);
24838: /**********************moved up from here **********************
24839: open c_EAI(r_EAI_unique.table_route_id,
24868: p_from_date => l_min_esd,
24869: p_to_date => l_max_eed );
24870: if l_dt_rec_found THEN
24871: --END TEMPIK
24872: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24873: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24876: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24869: p_to_date => l_max_eed );
24870: if l_dt_rec_found THEN
24871: --END TEMPIK
24872: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24873: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24876: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24870: if l_dt_rec_found THEN
24871: --END TEMPIK
24872: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24873: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24876: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24871: --END TEMPIK
24872: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24873: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24876: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24879: --
24872: if r_EAI_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
24873: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24876: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24879: --
24880: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24873: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PLIP_ID' then
24874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24876: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24879: --
24880: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24881: --
24874: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24875: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI_unique.information1 ;
24876: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24879: --
24880: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24881: --
24882: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24876: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24879: --
24880: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24881: --
24882: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24883: end if ;
24884: --
24878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24879: --
24880: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24881: --
24882: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24883: end if ;
24884: --
24885: l_object_found_in_target := true ;
24886: --TEMPIK
24914: end if ;
24915: --
24916:
24917: l_effective_date := r_EAI.information2;
24918: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24919: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24920: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24921: end if;
24922:
24915: --
24916:
24917: l_effective_date := r_EAI.information2;
24918: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24919: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24920: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24921: end if;
24922:
24923: if l_first_rec and not l_update then
24916:
24917: l_effective_date := r_EAI.information2;
24918: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24919: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24920: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24921: end if;
24922:
24923: if l_first_rec and not l_update then
24924: -- Call Create routine.
24978: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
24979: -- Update all relevent cer records with new pk_id
24980: hr_utility.set_location('Before plsql table ',222);
24981: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_plip_id,222);
24982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI.information1 ;
24984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PLIP_ID ;
24985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24979: -- Update all relevent cer records with new pk_id
24980: hr_utility.set_location('Before plsql table ',222);
24981: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_plip_id,222);
24982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI.information1 ;
24984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PLIP_ID ;
24985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24987: hr_utility.set_location('After plsql table ',222);
24980: hr_utility.set_location('Before plsql table ',222);
24981: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_plip_id,222);
24982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI.information1 ;
24984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PLIP_ID ;
24985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24987: hr_utility.set_location('After plsql table ',222);
24988: --
24981: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_plip_id,222);
24982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI.information1 ;
24984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PLIP_ID ;
24985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24987: hr_utility.set_location('After plsql table ',222);
24988: --
24989: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24982: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PLIP_ID' ;
24983: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAI.information1 ;
24984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PLIP_ID ;
24985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24987: hr_utility.set_location('After plsql table ',222);
24988: --
24989: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24990: --
24985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAI_unique.table_route_id;
24987: hr_utility.set_location('After plsql table ',222);
24988: --
24989: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24990: --
24991: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24992: --
24993: else
24987: hr_utility.set_location('After plsql table ',222);
24988: --
24989: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24990: --
24991: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24992: --
24993: else
24994: --
24995: -- Call Update routine for the pk_id created in prev run .
25107: end loop;
25108: --
25109: exception when others then
25110: --
25111: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EAI',r_EAI.information5 ) ;
25112: --
25113: end create_EAI_rows;
25114:
25115: --
25248: end if ;
25249: -- End Prefix Sufix derivation
25250: for r_EEP_unique in c_unique_EEP('EEP') loop
25251:
25252: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25253: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25254: r_EEP_unique.information3 >=
25255: ben_pd_copy_to_ben_one.g_copy_effective_date)
25256: ) then
25249: -- End Prefix Sufix derivation
25250: for r_EEP_unique in c_unique_EEP('EEP') loop
25251:
25252: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25253: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25254: r_EEP_unique.information3 >=
25255: ben_pd_copy_to_ben_one.g_copy_effective_date)
25256: ) then
25257: --
25251:
25252: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25253: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25254: r_EEP_unique.information3 >=
25255: ben_pd_copy_to_ben_one.g_copy_effective_date)
25256: ) then
25257: --
25258: hr_utility.set_location(' r_EEP_unique.table_route_id '||r_EEP_unique.table_route_id,10);
25259: hr_utility.set_location(' r_EEP_unique.information1 '||r_EEP_unique.information1,10);
25290: l_object_found_in_target := TRUE;
25291: --
25292: if l_process_date between r_EEP_unique.information2 and r_EEP_unique.information3 then
25293: l_update := true;
25294: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25295: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEP_unique.information1 ;
25291: --
25292: if l_process_date between r_EEP_unique.information2 and r_EEP_unique.information3 then
25293: l_update := true;
25294: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25295: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEP_unique.information1 ;
25299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25292: if l_process_date between r_EEP_unique.information2 and r_EEP_unique.information3 then
25293: l_update := true;
25294: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25295: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEP_unique.information1 ;
25299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25293: l_update := true;
25294: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25295: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEP_unique.information1 ;
25299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25301: --
25294: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25295: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEP_unique.information1 ;
25299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25301: --
25302: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25295: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEP_unique.information1 ;
25299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25301: --
25302: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25303: --
25296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEP_unique.information1 ;
25299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25301: --
25302: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25303: --
25304: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EEP_unique.information1 ;
25299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25301: --
25302: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25303: --
25304: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25305: --
25306: -- log_data('EEP',l_new_value,l_prefix || r_EEP_unique.name|| l_suffix,'REUSED');
25300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25301: --
25302: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25303: --
25304: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25305: --
25306: -- log_data('EEP',l_new_value,l_prefix || r_EEP_unique.name|| l_suffix,'REUSED');
25307: --
25308: end if ;
25321: open c_EEP_min_max_dates(r_EEP_unique.table_route_id, r_EEP_unique.information1 ) ;
25322: fetch c_EEP_min_max_dates into l_min_esd,l_max_eed ;
25323: --
25324:
25325: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25326: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25327: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25328: end if;
25329: l_min_esd := greatest(l_min_esd,r_EEP_unique.information2);
25322: fetch c_EEP_min_max_dates into l_min_esd,l_max_eed ;
25323: --
25324:
25325: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25326: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25327: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25328: end if;
25329: l_min_esd := greatest(l_min_esd,r_EEP_unique.information2);
25330: /**********************moved up from here **********************
25323: --
25324:
25325: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25326: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25327: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25328: end if;
25329: l_min_esd := greatest(l_min_esd,r_EEP_unique.information2);
25330: /**********************moved up from here **********************
25331: open c_EEP(r_EEP_unique.table_route_id,
25359: p_from_date => l_min_esd,
25360: p_to_date => l_max_eed );
25361: if l_dt_rec_found THEN
25362: --END TEMPIK
25363: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25364: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25360: p_to_date => l_max_eed );
25361: if l_dt_rec_found THEN
25362: --END TEMPIK
25363: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25364: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25361: if l_dt_rec_found THEN
25362: --END TEMPIK
25363: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25364: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25362: --END TEMPIK
25363: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25364: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25370: --
25363: if r_EEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25364: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25370: --
25371: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25364: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PL_ID' then
25365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25370: --
25371: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25372: --
25365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP_unique.information1 ;
25367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25370: --
25371: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25372: --
25373: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25370: --
25371: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25372: --
25373: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25374: end if ;
25375: --
25369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25370: --
25371: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25372: --
25373: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25374: end if ;
25375: --
25376: l_object_found_in_target := true ;
25377: --TEMPIK
25405: end if ;
25406: --
25407:
25408: l_effective_date := r_EEP.information2;
25409: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25410: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25411: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25412: end if;
25413:
25406: --
25407:
25408: l_effective_date := r_EEP.information2;
25409: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25410: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25411: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25412: end if;
25413:
25414: if l_first_rec and not l_update then
25407:
25408: l_effective_date := r_EEP.information2;
25409: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25410: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25411: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25412: end if;
25413:
25414: if l_first_rec and not l_update then
25415: -- Call Create routine.
25469: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
25470: -- Update all relevent cer records with new pk_id
25471: hr_utility.set_location('Before plsql table ',222);
25472: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_pl_id,222);
25473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP.information1 ;
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PL_ID ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25470: -- Update all relevent cer records with new pk_id
25471: hr_utility.set_location('Before plsql table ',222);
25472: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_pl_id,222);
25473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP.information1 ;
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PL_ID ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25478: hr_utility.set_location('After plsql table ',222);
25471: hr_utility.set_location('Before plsql table ',222);
25472: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_pl_id,222);
25473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP.information1 ;
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PL_ID ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25478: hr_utility.set_location('After plsql table ',222);
25479: --
25472: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_pl_id,222);
25473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP.information1 ;
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PL_ID ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25478: hr_utility.set_location('After plsql table ',222);
25479: --
25480: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PL_ID' ;
25474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EEP.information1 ;
25475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PL_ID ;
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25478: hr_utility.set_location('After plsql table ',222);
25479: --
25480: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25481: --
25476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EEP_unique.table_route_id;
25478: hr_utility.set_location('After plsql table ',222);
25479: --
25480: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25481: --
25482: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25483: --
25484: else
25478: hr_utility.set_location('After plsql table ',222);
25479: --
25480: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25481: --
25482: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25483: --
25484: else
25485: --
25486: -- Call Update routine for the pk_id created in prev run .
25598: end loop;
25599: --
25600: exception when others then
25601: --
25602: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EEP',r_EEP.information5 ) ;
25603: --
25604: end create_EEP_rows;
25605:
25606: --
25739: end if ;
25740: -- End Prefix Sufix derivation
25741: for r_EET_unique in c_unique_EET('EET') loop
25742:
25743: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25744: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25745: r_EET_unique.information3 >=
25746: ben_pd_copy_to_ben_one.g_copy_effective_date)
25747: ) then
25740: -- End Prefix Sufix derivation
25741: for r_EET_unique in c_unique_EET('EET') loop
25742:
25743: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25744: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25745: r_EET_unique.information3 >=
25746: ben_pd_copy_to_ben_one.g_copy_effective_date)
25747: ) then
25748: --
25742:
25743: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25744: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25745: r_EET_unique.information3 >=
25746: ben_pd_copy_to_ben_one.g_copy_effective_date)
25747: ) then
25748: --
25749: hr_utility.set_location(' r_EET_unique.table_route_id '||r_EET_unique.table_route_id,10);
25750: hr_utility.set_location(' r_EET_unique.information1 '||r_EET_unique.information1,10);
25783: l_object_found_in_target := TRUE;
25784: --
25785: if l_process_date between r_EET_unique.information2 and r_EET_unique.information3 then
25786: l_update := true;
25787: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25788: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EET_unique.information1 ;
25784: --
25785: if l_process_date between r_EET_unique.information2 and r_EET_unique.information3 then
25786: l_update := true;
25787: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25788: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EET_unique.information1 ;
25792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25785: if l_process_date between r_EET_unique.information2 and r_EET_unique.information3 then
25786: l_update := true;
25787: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25788: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EET_unique.information1 ;
25792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25786: l_update := true;
25787: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25788: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EET_unique.information1 ;
25792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25794: --
25787: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25788: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EET_unique.information1 ;
25792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25794: --
25795: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25788: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EET_unique.information1 ;
25792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25794: --
25795: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25796: --
25789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EET_unique.information1 ;
25792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25794: --
25795: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25796: --
25797: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EET_unique.information1 ;
25792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25794: --
25795: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25796: --
25797: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25798: --
25799: -- log_data('EET',l_new_value,l_prefix || r_EET_unique.name|| l_suffix,'REUSED');
25793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25794: --
25795: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25796: --
25797: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25798: --
25799: -- log_data('EET',l_new_value,l_prefix || r_EET_unique.name|| l_suffix,'REUSED');
25800: --
25801: end if ;
25814: open c_EET_min_max_dates(r_EET_unique.table_route_id, r_EET_unique.information1 ) ;
25815: fetch c_EET_min_max_dates into l_min_esd,l_max_eed ;
25816: --
25817:
25818: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25819: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25820: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25821: end if;
25822: l_min_esd := greatest(l_min_esd,r_EET_unique.information2);
25815: fetch c_EET_min_max_dates into l_min_esd,l_max_eed ;
25816: --
25817:
25818: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25819: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25820: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25821: end if;
25822: l_min_esd := greatest(l_min_esd,r_EET_unique.information2);
25823: /**********************moved up from here **********************
25816: --
25817:
25818: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25819: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25820: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25821: end if;
25822: l_min_esd := greatest(l_min_esd,r_EET_unique.information2);
25823: /**********************moved up from here **********************
25824: open c_EET(r_EET_unique.table_route_id,
25855: p_from_date => l_min_esd,
25856: p_to_date => l_max_eed );
25857: if l_dt_rec_found THEN
25858: --END TEMPIK
25859: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25856: p_to_date => l_max_eed );
25857: if l_dt_rec_found THEN
25858: --END TEMPIK
25859: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25857: if l_dt_rec_found THEN
25858: --END TEMPIK
25859: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25858: --END TEMPIK
25859: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25866: --
25859: if r_EET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
25860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25866: --
25867: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ENRLD_ANTHR_PTIP_ID' then
25861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25866: --
25867: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25868: --
25861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET_unique.information1 ;
25863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25866: --
25867: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25868: --
25869: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25866: --
25867: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25868: --
25869: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25870: end if ;
25871: --
25865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25866: --
25867: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25868: --
25869: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25870: end if ;
25871: --
25872: l_object_found_in_target := true ;
25873: --TEMPIK
25901: end if ;
25902: --
25903:
25904: l_effective_date := r_EET.information2;
25905: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25906: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25907: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25908: end if;
25909:
25902: --
25903:
25904: l_effective_date := r_EET.information2;
25905: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25906: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25907: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25908: end if;
25909:
25910: if l_first_rec and not l_update then
25903:
25904: l_effective_date := r_EET.information2;
25905: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25906: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25907: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25908: end if;
25909:
25910: if l_first_rec and not l_update then
25911: -- Call Create routine.
25966: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
25967: -- Update all relevent cer records with new pk_id
25968: hr_utility.set_location('Before plsql table ',222);
25969: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_ptip_id,222);
25970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET.information1 ;
25972: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PTIP_ID ;
25973: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25974: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25967: -- Update all relevent cer records with new pk_id
25968: hr_utility.set_location('Before plsql table ',222);
25969: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_ptip_id,222);
25970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET.information1 ;
25972: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PTIP_ID ;
25973: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25974: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25975: hr_utility.set_location('After plsql table ',222);
25968: hr_utility.set_location('Before plsql table ',222);
25969: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_ptip_id,222);
25970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET.information1 ;
25972: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PTIP_ID ;
25973: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25974: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25975: hr_utility.set_location('After plsql table ',222);
25976: --
25969: hr_utility.set_location('new_value id '||l_elig_enrld_anthr_ptip_id,222);
25970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET.information1 ;
25972: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PTIP_ID ;
25973: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25974: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25975: hr_utility.set_location('After plsql table ',222);
25976: --
25977: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25970: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ENRLD_ANTHR_PTIP_ID' ;
25971: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EET.information1 ;
25972: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ENRLD_ANTHR_PTIP_ID ;
25973: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25974: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25975: hr_utility.set_location('After plsql table ',222);
25976: --
25977: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25978: --
25973: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25974: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EET_unique.table_route_id;
25975: hr_utility.set_location('After plsql table ',222);
25976: --
25977: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25978: --
25979: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25980: --
25981: else
25975: hr_utility.set_location('After plsql table ',222);
25976: --
25977: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25978: --
25979: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25980: --
25981: else
25982: --
25983: -- Call Update routine for the pk_id created in prev run .
26096: end loop;
26097: --
26098: exception when others then
26099: --
26100: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EET',r_EET.information5 ) ;
26101: --
26102: end create_EET_rows;
26103:
26104: --
26244: end if ;
26245: -- End Prefix Sufix derivation
26246: for r_EFP_unique in c_unique_EFP('EFP') loop
26247:
26248: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26249: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26250: r_EFP_unique.information3 >=
26251: ben_pd_copy_to_ben_one.g_copy_effective_date)
26252: ) then
26245: -- End Prefix Sufix derivation
26246: for r_EFP_unique in c_unique_EFP('EFP') loop
26247:
26248: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26249: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26250: r_EFP_unique.information3 >=
26251: ben_pd_copy_to_ben_one.g_copy_effective_date)
26252: ) then
26253: --
26247:
26248: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26249: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26250: r_EFP_unique.information3 >=
26251: ben_pd_copy_to_ben_one.g_copy_effective_date)
26252: ) then
26253: --
26254: hr_utility.set_location(' r_EFP_unique.table_route_id '||r_EFP_unique.table_route_id,10);
26255: hr_utility.set_location(' r_EFP_unique.information1 '||r_EFP_unique.information1,10);
26286: l_object_found_in_target := TRUE;
26287: --
26288: if l_process_date between r_EFP_unique.information2 and r_EFP_unique.information3 then
26289: l_update := true;
26290: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26291: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EFP_unique.information1 ;
26287: --
26288: if l_process_date between r_EFP_unique.information2 and r_EFP_unique.information3 then
26289: l_update := true;
26290: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26291: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EFP_unique.information1 ;
26295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26288: if l_process_date between r_EFP_unique.information2 and r_EFP_unique.information3 then
26289: l_update := true;
26290: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26291: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EFP_unique.information1 ;
26295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26289: l_update := true;
26290: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26291: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EFP_unique.information1 ;
26295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26297: --
26290: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26291: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EFP_unique.information1 ;
26295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26297: --
26298: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26291: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EFP_unique.information1 ;
26295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26297: --
26298: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26299: --
26292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EFP_unique.information1 ;
26295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26297: --
26298: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26299: --
26300: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EFP_unique.information1 ;
26295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26297: --
26298: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26299: --
26300: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26301: --
26302: -- log_data('EFP',l_new_value,l_prefix || r_EFP_unique.name|| l_suffix,'REUSED');
26296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26297: --
26298: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26299: --
26300: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26301: --
26302: -- log_data('EFP',l_new_value,l_prefix || r_EFP_unique.name|| l_suffix,'REUSED');
26303: --
26304: end if ;
26317: open c_EFP_min_max_dates(r_EFP_unique.table_route_id, r_EFP_unique.information1 ) ;
26318: fetch c_EFP_min_max_dates into l_min_esd,l_max_eed ;
26319: --
26320:
26321: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26322: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26323: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26324: end if;
26325: l_min_esd := greatest(l_min_esd,r_EFP_unique.information2);
26318: fetch c_EFP_min_max_dates into l_min_esd,l_max_eed ;
26319: --
26320:
26321: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26322: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26323: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26324: end if;
26325: l_min_esd := greatest(l_min_esd,r_EFP_unique.information2);
26326: /**********************moved up from here **********************
26319: --
26320:
26321: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26322: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26323: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26324: end if;
26325: l_min_esd := greatest(l_min_esd,r_EFP_unique.information2);
26326: /**********************moved up from here **********************
26327: open c_EFP(r_EFP_unique.table_route_id,
26357: p_from_date => l_min_esd,
26358: p_to_date => l_max_eed );
26359: if l_dt_rec_found THEN
26360: --END TEMPIK
26361: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26362: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26363: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26364: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26358: p_to_date => l_max_eed );
26359: if l_dt_rec_found THEN
26360: --END TEMPIK
26361: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26362: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26363: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26364: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26359: if l_dt_rec_found THEN
26360: --END TEMPIK
26361: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26362: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26363: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26364: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26360: --END TEMPIK
26361: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26362: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26363: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26364: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26368: --
26361: if r_EFP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26362: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26363: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26364: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26368: --
26369: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26362: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_FL_TM_PT_TM_PRTE_ID' then
26363: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26364: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26368: --
26369: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26370: --
26363: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26364: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP_unique.information1 ;
26365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26368: --
26369: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26370: --
26371: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26365: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26366: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26368: --
26369: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26370: --
26371: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26372: end if ;
26373: --
26367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26368: --
26369: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26370: --
26371: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26372: end if ;
26373: --
26374: l_object_found_in_target := true ;
26375: --TEMPIK
26403: end if ;
26404: --
26405:
26406: l_effective_date := r_EFP.information2;
26407: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26408: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26409: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26410: end if;
26411:
26404: --
26405:
26406: l_effective_date := r_EFP.information2;
26407: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26408: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26409: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26410: end if;
26411:
26412: if l_first_rec and not l_update then
26405:
26406: l_effective_date := r_EFP.information2;
26407: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26408: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26409: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26410: end if;
26411:
26412: if l_first_rec and not l_update then
26413: -- Call Create routine.
26468: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
26469: -- Update all relevent cer records with new pk_id
26470: hr_utility.set_location('Before plsql table ',222);
26471: hr_utility.set_location('new_value id '||l_elig_fl_tm_pt_tm_prte_id,222);
26472: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP.information1 ;
26474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_FL_TM_PT_TM_PRTE_ID ;
26475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26469: -- Update all relevent cer records with new pk_id
26470: hr_utility.set_location('Before plsql table ',222);
26471: hr_utility.set_location('new_value id '||l_elig_fl_tm_pt_tm_prte_id,222);
26472: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP.information1 ;
26474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_FL_TM_PT_TM_PRTE_ID ;
26475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26477: hr_utility.set_location('After plsql table ',222);
26470: hr_utility.set_location('Before plsql table ',222);
26471: hr_utility.set_location('new_value id '||l_elig_fl_tm_pt_tm_prte_id,222);
26472: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP.information1 ;
26474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_FL_TM_PT_TM_PRTE_ID ;
26475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26477: hr_utility.set_location('After plsql table ',222);
26478: --
26471: hr_utility.set_location('new_value id '||l_elig_fl_tm_pt_tm_prte_id,222);
26472: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP.information1 ;
26474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_FL_TM_PT_TM_PRTE_ID ;
26475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26477: hr_utility.set_location('After plsql table ',222);
26478: --
26479: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26472: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_FL_TM_PT_TM_PRTE_ID' ;
26473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EFP.information1 ;
26474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_FL_TM_PT_TM_PRTE_ID ;
26475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26477: hr_utility.set_location('After plsql table ',222);
26478: --
26479: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26480: --
26475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EFP_unique.table_route_id;
26477: hr_utility.set_location('After plsql table ',222);
26478: --
26479: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26480: --
26481: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26482: --
26483: else
26477: hr_utility.set_location('After plsql table ',222);
26478: --
26479: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26480: --
26481: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26482: --
26483: else
26484: --
26485: -- Call Update routine for the pk_id created in prev run .
26598: end loop;
26599: --
26600: exception when others then
26601: --
26602: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EFP',r_EFP.information5 ) ;
26603: --
26604: end create_EFP_rows;
26605:
26606: --
26750: end if ;
26751: -- End Prefix Sufix derivation
26752: for r_EGR_unique in c_unique_EGR('EGR') loop
26753:
26754: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26755: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26756: r_EGR_unique.information3 >=
26757: ben_pd_copy_to_ben_one.g_copy_effective_date)
26758: ) then
26751: -- End Prefix Sufix derivation
26752: for r_EGR_unique in c_unique_EGR('EGR') loop
26753:
26754: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26755: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26756: r_EGR_unique.information3 >=
26757: ben_pd_copy_to_ben_one.g_copy_effective_date)
26758: ) then
26759: --
26753:
26754: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26755: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26756: r_EGR_unique.information3 >=
26757: ben_pd_copy_to_ben_one.g_copy_effective_date)
26758: ) then
26759: --
26760: hr_utility.set_location(' r_EGR_unique.table_route_id '||r_EGR_unique.table_route_id,10);
26761: hr_utility.set_location(' r_EGR_unique.information1 '||r_EGR_unique.information1,10);
26782: close c_EGR ;
26783: --
26784: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EGR.INFORMATION263,l_dml_operation);
26785: --
26786: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
26787: l_GRADE_ID := r_EGR.information176;
26788: else
26789: l_GRADE_ID := r_EGR.information174;
26790: end if;
26797: l_object_found_in_target := TRUE;
26798: --
26799: if l_process_date between r_EGR_unique.information2 and r_EGR_unique.information3 then
26800: l_update := true;
26801: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26802: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGR_unique.information1 ;
26798: --
26799: if l_process_date between r_EGR_unique.information2 and r_EGR_unique.information3 then
26800: l_update := true;
26801: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26802: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGR_unique.information1 ;
26806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26799: if l_process_date between r_EGR_unique.information2 and r_EGR_unique.information3 then
26800: l_update := true;
26801: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26802: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGR_unique.information1 ;
26806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26800: l_update := true;
26801: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26802: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGR_unique.information1 ;
26806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26808: --
26801: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26802: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGR_unique.information1 ;
26806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26808: --
26809: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26802: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGR_unique.information1 ;
26806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26808: --
26809: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26810: --
26803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGR_unique.information1 ;
26806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26808: --
26809: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26810: --
26811: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGR_unique.information1 ;
26806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26808: --
26809: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26810: --
26811: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26812: --
26813: -- log_data('EGR',l_new_value,l_prefix || r_EGR_unique.name|| l_suffix,'REUSED');
26807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26808: --
26809: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26810: --
26811: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26812: --
26813: -- log_data('EGR',l_new_value,l_prefix || r_EGR_unique.name|| l_suffix,'REUSED');
26814: --
26815: end if ;
26828: open c_EGR_min_max_dates(r_EGR_unique.table_route_id, r_EGR_unique.information1 ) ;
26829: fetch c_EGR_min_max_dates into l_min_esd,l_max_eed ;
26830: --
26831:
26832: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26833: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26834: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26835: end if;
26836: l_min_esd := greatest(l_min_esd,r_EGR_unique.information2);
26829: fetch c_EGR_min_max_dates into l_min_esd,l_max_eed ;
26830: --
26831:
26832: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26833: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26834: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26835: end if;
26836: l_min_esd := greatest(l_min_esd,r_EGR_unique.information2);
26837: /**********************moved up from here **********************
26830: --
26831:
26832: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26833: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26834: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26835: end if;
26836: l_min_esd := greatest(l_min_esd,r_EGR_unique.information2);
26837: /**********************moved up from here **********************
26838: open c_EGR(r_EGR_unique.table_route_id,
26845: close c_EGR ;
26846: --
26847: l_ELIGY_PRFL_ID := get_fk('ELIGY_PRFL_ID', r_EGR.INFORMATION263,l_dml_operation);
26848: --
26849: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
26850: l_GRADE_ID := r_EGR.information176;
26851: else
26852: l_GRADE_ID := r_EGR.information174;
26853: end if;
26883: p_from_date => l_min_esd,
26884: p_to_date => l_max_eed );
26885: if l_dt_rec_found THEN
26886: --END TEMPIK
26887: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26888: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26884: p_to_date => l_max_eed );
26885: if l_dt_rec_found THEN
26886: --END TEMPIK
26887: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26888: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26892: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26885: if l_dt_rec_found THEN
26886: --END TEMPIK
26887: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26888: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26892: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26886: --END TEMPIK
26887: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26888: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26892: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26894: --
26887: if r_EGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
26888: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26892: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26894: --
26895: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26888: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GRD_PRTE_ID' then
26889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26892: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26894: --
26895: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26896: --
26889: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
26890: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR_unique.information1 ;
26891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26892: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26894: --
26895: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26896: --
26897: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26891: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26892: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26894: --
26895: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26896: --
26897: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26898: end if ;
26899: --
26893: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26894: --
26895: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26896: --
26897: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26898: end if ;
26899: --
26900: l_object_found_in_target := true ;
26901: --TEMPIK
26932: end if ;
26933: --
26934:
26935: l_effective_date := r_EGR.information2;
26936: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26937: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26938: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26939: end if;
26940:
26933: --
26934:
26935: l_effective_date := r_EGR.information2;
26936: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26937: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26938: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26939: end if;
26940:
26941: if l_first_rec and not l_update then
26934:
26935: l_effective_date := r_EGR.information2;
26936: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26937: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26938: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26939: end if;
26940:
26941: if l_first_rec and not l_update then
26942: -- Call Create routine.
26997: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
26998: -- Update all relevent cer records with new pk_id
26999: hr_utility.set_location('Before plsql table ',222);
27000: hr_utility.set_location('new_value id '||l_elig_grd_prte_id,222);
27001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
27002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR.information1 ;
27003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GRD_PRTE_ID ;
27004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
26998: -- Update all relevent cer records with new pk_id
26999: hr_utility.set_location('Before plsql table ',222);
27000: hr_utility.set_location('new_value id '||l_elig_grd_prte_id,222);
27001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
27002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR.information1 ;
27003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GRD_PRTE_ID ;
27004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
27006: hr_utility.set_location('After plsql table ',222);
26999: hr_utility.set_location('Before plsql table ',222);
27000: hr_utility.set_location('new_value id '||l_elig_grd_prte_id,222);
27001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
27002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR.information1 ;
27003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GRD_PRTE_ID ;
27004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
27006: hr_utility.set_location('After plsql table ',222);
27007: --
27000: hr_utility.set_location('new_value id '||l_elig_grd_prte_id,222);
27001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
27002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR.information1 ;
27003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GRD_PRTE_ID ;
27004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
27006: hr_utility.set_location('After plsql table ',222);
27007: --
27008: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GRD_PRTE_ID' ;
27002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGR.information1 ;
27003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GRD_PRTE_ID ;
27004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
27006: hr_utility.set_location('After plsql table ',222);
27007: --
27008: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27009: --
27004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGR_unique.table_route_id;
27006: hr_utility.set_location('After plsql table ',222);
27007: --
27008: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27009: --
27010: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27011: --
27012: else
27006: hr_utility.set_location('After plsql table ',222);
27007: --
27008: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27009: --
27010: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27011: --
27012: else
27013: --
27014: -- Call Update routine for the pk_id created in prev run .
27129: end loop;
27130: --
27131: exception when others then
27132: --
27133: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EGR',r_EGR.information5 ) ;
27134: --
27135: end create_EGR_rows;
27136:
27137: --
27276: end if ;
27277: -- End Prefix Sufix derivation
27278: for r_EHS_unique in c_unique_EHS('EHS') loop
27279:
27280: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
27281: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27282: r_EHS_unique.information3 >=
27283: ben_pd_copy_to_ben_one.g_copy_effective_date)
27284: ) then
27277: -- End Prefix Sufix derivation
27278: for r_EHS_unique in c_unique_EHS('EHS') loop
27279:
27280: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
27281: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27282: r_EHS_unique.information3 >=
27283: ben_pd_copy_to_ben_one.g_copy_effective_date)
27284: ) then
27285: --
27279:
27280: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
27281: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27282: r_EHS_unique.information3 >=
27283: ben_pd_copy_to_ben_one.g_copy_effective_date)
27284: ) then
27285: --
27286: hr_utility.set_location(' r_EHS_unique.table_route_id '||r_EHS_unique.table_route_id,10);
27287: hr_utility.set_location(' r_EHS_unique.information1 '||r_EHS_unique.information1,10);
27318: l_object_found_in_target := TRUE;
27319: --
27320: if l_process_date between r_EHS_unique.information2 and r_EHS_unique.information3 then
27321: l_update := true;
27322: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27323: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHS_unique.information1 ;
27319: --
27320: if l_process_date between r_EHS_unique.information2 and r_EHS_unique.information3 then
27321: l_update := true;
27322: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27323: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHS_unique.information1 ;
27327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27320: if l_process_date between r_EHS_unique.information2 and r_EHS_unique.information3 then
27321: l_update := true;
27322: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27323: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHS_unique.information1 ;
27327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27321: l_update := true;
27322: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27323: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHS_unique.information1 ;
27327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27329: --
27322: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27323: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHS_unique.information1 ;
27327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27329: --
27330: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27323: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHS_unique.information1 ;
27327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27329: --
27330: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27331: --
27324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHS_unique.information1 ;
27327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27329: --
27330: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27331: --
27332: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHS_unique.information1 ;
27327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27329: --
27330: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27331: --
27332: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27333: --
27334: -- log_data('EHS',l_new_value,l_prefix || r_EHS_unique.name|| l_suffix,'REUSED');
27328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27329: --
27330: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27331: --
27332: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27333: --
27334: -- log_data('EHS',l_new_value,l_prefix || r_EHS_unique.name|| l_suffix,'REUSED');
27335: --
27336: end if ;
27349: open c_EHS_min_max_dates(r_EHS_unique.table_route_id, r_EHS_unique.information1 ) ;
27350: fetch c_EHS_min_max_dates into l_min_esd,l_max_eed ;
27351: --
27352:
27353: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27354: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27355: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
27356: end if;
27357: l_min_esd := greatest(l_min_esd,r_EHS_unique.information2);
27350: fetch c_EHS_min_max_dates into l_min_esd,l_max_eed ;
27351: --
27352:
27353: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27354: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27355: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
27356: end if;
27357: l_min_esd := greatest(l_min_esd,r_EHS_unique.information2);
27358: /**********************moved up from here **********************
27351: --
27352:
27353: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27354: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27355: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
27356: end if;
27357: l_min_esd := greatest(l_min_esd,r_EHS_unique.information2);
27358: /**********************moved up from here **********************
27359: open c_EHS(r_EHS_unique.table_route_id,
27388: p_from_date => l_min_esd,
27389: p_to_date => l_max_eed );
27390: if l_dt_rec_found THEN
27391: --END TEMPIK
27392: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27393: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27389: p_to_date => l_max_eed );
27390: if l_dt_rec_found THEN
27391: --END TEMPIK
27392: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27393: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27390: if l_dt_rec_found THEN
27391: --END TEMPIK
27392: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27393: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27391: --END TEMPIK
27392: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27393: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27399: --
27392: if r_EHS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27393: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27399: --
27400: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27393: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HRLY_SLRD_PRTE_ID' then
27394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27399: --
27400: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27401: --
27394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS_unique.information1 ;
27396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27399: --
27400: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27401: --
27402: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27399: --
27400: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27401: --
27402: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27403: end if ;
27404: --
27398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27399: --
27400: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27401: --
27402: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27403: end if ;
27404: --
27405: l_object_found_in_target := true ;
27406: --TEMPIK
27434: end if ;
27435: --
27436:
27437: l_effective_date := r_EHS.information2;
27438: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27439: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27440: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27441: end if;
27442:
27435: --
27436:
27437: l_effective_date := r_EHS.information2;
27438: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27439: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27440: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27441: end if;
27442:
27443: if l_first_rec and not l_update then
27436:
27437: l_effective_date := r_EHS.information2;
27438: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27439: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27440: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27441: end if;
27442:
27443: if l_first_rec and not l_update then
27444: -- Call Create routine.
27499: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
27500: -- Update all relevent cer records with new pk_id
27501: hr_utility.set_location('Before plsql table ',222);
27502: hr_utility.set_location('new_value id '||l_elig_hrly_slrd_prte_id,222);
27503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS.information1 ;
27505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRLY_SLRD_PRTE_ID ;
27506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27500: -- Update all relevent cer records with new pk_id
27501: hr_utility.set_location('Before plsql table ',222);
27502: hr_utility.set_location('new_value id '||l_elig_hrly_slrd_prte_id,222);
27503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS.information1 ;
27505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRLY_SLRD_PRTE_ID ;
27506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27508: hr_utility.set_location('After plsql table ',222);
27501: hr_utility.set_location('Before plsql table ',222);
27502: hr_utility.set_location('new_value id '||l_elig_hrly_slrd_prte_id,222);
27503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS.information1 ;
27505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRLY_SLRD_PRTE_ID ;
27506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27508: hr_utility.set_location('After plsql table ',222);
27509: --
27502: hr_utility.set_location('new_value id '||l_elig_hrly_slrd_prte_id,222);
27503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS.information1 ;
27505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRLY_SLRD_PRTE_ID ;
27506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27508: hr_utility.set_location('After plsql table ',222);
27509: --
27510: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HRLY_SLRD_PRTE_ID' ;
27504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHS.information1 ;
27505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HRLY_SLRD_PRTE_ID ;
27506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27508: hr_utility.set_location('After plsql table ',222);
27509: --
27510: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27511: --
27506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
27507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHS_unique.table_route_id;
27508: hr_utility.set_location('After plsql table ',222);
27509: --
27510: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27511: --
27512: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27513: --
27514: else
27508: hr_utility.set_location('After plsql table ',222);
27509: --
27510: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27511: --
27512: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27513: --
27514: else
27515: --
27516: -- Call Update routine for the pk_id created in prev run .
27629: end loop;
27630: --
27631: exception when others then
27632: --
27633: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EHS',r_EHS.information5 ) ;
27634: --
27635: end create_EHS_rows;
27636:
27637: --
27779: end if ;
27780: -- End Prefix Sufix derivation
27781: for r_ERG_unique in c_unique_ERG('ERG') loop
27782:
27783: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
27784: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27785: r_ERG_unique.information3 >=
27786: ben_pd_copy_to_ben_one.g_copy_effective_date)
27787: ) then
27780: -- End Prefix Sufix derivation
27781: for r_ERG_unique in c_unique_ERG('ERG') loop
27782:
27783: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
27784: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27785: r_ERG_unique.information3 >=
27786: ben_pd_copy_to_ben_one.g_copy_effective_date)
27787: ) then
27788: --
27782:
27783: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
27784: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27785: r_ERG_unique.information3 >=
27786: ben_pd_copy_to_ben_one.g_copy_effective_date)
27787: ) then
27788: --
27789: hr_utility.set_location(' r_ERG_unique.table_route_id '||r_ERG_unique.table_route_id,10);
27790: hr_utility.set_location(' r_ERG_unique.information1 '||r_ERG_unique.information1,10);
27821: l_object_found_in_target := TRUE;
27822: --
27823: if l_process_date between r_ERG_unique.information2 and r_ERG_unique.information3 then
27824: l_update := true;
27825: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27826: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERG_unique.information1 ;
27822: --
27823: if l_process_date between r_ERG_unique.information2 and r_ERG_unique.information3 then
27824: l_update := true;
27825: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27826: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERG_unique.information1 ;
27830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27823: if l_process_date between r_ERG_unique.information2 and r_ERG_unique.information3 then
27824: l_update := true;
27825: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27826: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERG_unique.information1 ;
27830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27824: l_update := true;
27825: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27826: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERG_unique.information1 ;
27830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27832: --
27825: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27826: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERG_unique.information1 ;
27830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27832: --
27833: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27826: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERG_unique.information1 ;
27830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27832: --
27833: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27834: --
27827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERG_unique.information1 ;
27830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27832: --
27833: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27834: --
27835: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERG_unique.information1 ;
27830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27832: --
27833: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27834: --
27835: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27836: --
27837: -- log_data('ERG',l_new_value,l_prefix || r_ERG_unique.name|| l_suffix,'REUSED');
27831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27832: --
27833: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
27834: --
27835: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27836: --
27837: -- log_data('ERG',l_new_value,l_prefix || r_ERG_unique.name|| l_suffix,'REUSED');
27838: --
27839: end if ;
27852: open c_ERG_min_max_dates(r_ERG_unique.table_route_id, r_ERG_unique.information1 ) ;
27853: fetch c_ERG_min_max_dates into l_min_esd,l_max_eed ;
27854: --
27855:
27856: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27857: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27858: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
27859: end if;
27860: l_min_esd := greatest(l_min_esd,r_ERG_unique.information2);
27853: fetch c_ERG_min_max_dates into l_min_esd,l_max_eed ;
27854: --
27855:
27856: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27857: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27858: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
27859: end if;
27860: l_min_esd := greatest(l_min_esd,r_ERG_unique.information2);
27861: /**********************moved up from here **********************
27854: --
27855:
27856: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27857: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27858: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
27859: end if;
27860: l_min_esd := greatest(l_min_esd,r_ERG_unique.information2);
27861: /**********************moved up from here **********************
27862: open c_ERG(r_ERG_unique.table_route_id,
27891: p_from_date => l_min_esd,
27892: p_to_date => l_max_eed );
27893: if l_dt_rec_found THEN
27894: --END TEMPIK
27895: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27896: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27892: p_to_date => l_max_eed );
27893: if l_dt_rec_found THEN
27894: --END TEMPIK
27895: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27896: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27893: if l_dt_rec_found THEN
27894: --END TEMPIK
27895: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27896: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27901: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27894: --END TEMPIK
27895: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27896: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27901: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27902: --
27895: if r_ERG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
27896: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27901: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27902: --
27903: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27896: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PERF_RTNG_PRTE_ID' then
27897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27901: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27902: --
27903: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27904: --
27897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
27898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG_unique.information1 ;
27899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27901: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27902: --
27903: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27904: --
27905: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27899: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
27900: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27901: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27902: --
27903: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27904: --
27905: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27906: end if ;
27907: --
27901: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
27902: --
27903: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
27904: --
27905: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27906: end if ;
27907: --
27908: l_object_found_in_target := true ;
27909: --TEMPIK
27937: end if ;
27938: --
27939:
27940: l_effective_date := r_ERG.information2;
27941: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27942: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27943: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27944: end if;
27945:
27938: --
27939:
27940: l_effective_date := r_ERG.information2;
27941: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27942: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27943: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27944: end if;
27945:
27946: if l_first_rec and not l_update then
27939:
27940: l_effective_date := r_ERG.information2;
27941: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27942: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27943: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27944: end if;
27945:
27946: if l_first_rec and not l_update then
27947: -- Call Create routine.
28003: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
28004: -- Update all relevent cer records with new pk_id
28005: hr_utility.set_location('Before plsql table ',222);
28006: hr_utility.set_location('new_value id '||l_elig_perf_rtng_prte_id,222);
28007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
28008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG.information1 ;
28009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PERF_RTNG_PRTE_ID ;
28010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28011: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
28004: -- Update all relevent cer records with new pk_id
28005: hr_utility.set_location('Before plsql table ',222);
28006: hr_utility.set_location('new_value id '||l_elig_perf_rtng_prte_id,222);
28007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
28008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG.information1 ;
28009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PERF_RTNG_PRTE_ID ;
28010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28011: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
28012: hr_utility.set_location('After plsql table ',222);
28005: hr_utility.set_location('Before plsql table ',222);
28006: hr_utility.set_location('new_value id '||l_elig_perf_rtng_prte_id,222);
28007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
28008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG.information1 ;
28009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PERF_RTNG_PRTE_ID ;
28010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28011: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
28012: hr_utility.set_location('After plsql table ',222);
28013: --
28006: hr_utility.set_location('new_value id '||l_elig_perf_rtng_prte_id,222);
28007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
28008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG.information1 ;
28009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PERF_RTNG_PRTE_ID ;
28010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28011: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
28012: hr_utility.set_location('After plsql table ',222);
28013: --
28014: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PERF_RTNG_PRTE_ID' ;
28008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERG.information1 ;
28009: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_PERF_RTNG_PRTE_ID ;
28010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28011: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
28012: hr_utility.set_location('After plsql table ',222);
28013: --
28014: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28015: --
28010: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28011: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERG_unique.table_route_id;
28012: hr_utility.set_location('After plsql table ',222);
28013: --
28014: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28015: --
28016: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28017: --
28018: else
28012: hr_utility.set_location('After plsql table ',222);
28013: --
28014: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28015: --
28016: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28017: --
28018: else
28019: --
28020: -- Call Update routine for the pk_id created in prev run .
28134: end loop;
28135: --
28136: exception when others then
28137: --
28138: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ERG',r_ERG.information5 ) ;
28139: --
28140: end create_ERG_rows;
28141:
28142: --
28280: end if ;
28281: -- End Prefix Sufix derivation
28282: for r_EQG_unique in c_unique_EQG('EQG') loop
28283:
28284: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
28285: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28286: r_EQG_unique.information3 >=
28287: ben_pd_copy_to_ben_one.g_copy_effective_date)
28288: ) then
28281: -- End Prefix Sufix derivation
28282: for r_EQG_unique in c_unique_EQG('EQG') loop
28283:
28284: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
28285: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28286: r_EQG_unique.information3 >=
28287: ben_pd_copy_to_ben_one.g_copy_effective_date)
28288: ) then
28289: --
28283:
28284: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
28285: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28286: r_EQG_unique.information3 >=
28287: ben_pd_copy_to_ben_one.g_copy_effective_date)
28288: ) then
28289: --
28290: hr_utility.set_location(' r_EQG_unique.table_route_id '||r_EQG_unique.table_route_id,10);
28291: hr_utility.set_location(' r_EQG_unique.information1 '||r_EQG_unique.information1,10);
28321: l_object_found_in_target := TRUE;
28322: --
28323: if l_process_date between r_EQG_unique.information2 and r_EQG_unique.information3 then
28324: l_update := true;
28325: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQG_unique.information1 ;
28322: --
28323: if l_process_date between r_EQG_unique.information2 and r_EQG_unique.information3 then
28324: l_update := true;
28325: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQG_unique.information1 ;
28330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28323: if l_process_date between r_EQG_unique.information2 and r_EQG_unique.information3 then
28324: l_update := true;
28325: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQG_unique.information1 ;
28330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28324: l_update := true;
28325: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQG_unique.information1 ;
28330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28332: --
28325: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQG_unique.information1 ;
28330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28332: --
28333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQG_unique.information1 ;
28330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28332: --
28333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28334: --
28327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQG_unique.information1 ;
28330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28332: --
28333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28334: --
28335: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EQG_unique.information1 ;
28330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28332: --
28333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28334: --
28335: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28336: --
28337: -- log_data('EQG',l_new_value,l_prefix || r_EQG_unique.name|| l_suffix,'REUSED');
28331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28332: --
28333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28334: --
28335: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28336: --
28337: -- log_data('EQG',l_new_value,l_prefix || r_EQG_unique.name|| l_suffix,'REUSED');
28338: --
28339: end if ;
28352: open c_EQG_min_max_dates(r_EQG_unique.table_route_id, r_EQG_unique.information1 ) ;
28353: fetch c_EQG_min_max_dates into l_min_esd,l_max_eed ;
28354: --
28355:
28356: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28357: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28358: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
28359: end if;
28360: l_min_esd := greatest(l_min_esd,r_EQG_unique.information2);
28353: fetch c_EQG_min_max_dates into l_min_esd,l_max_eed ;
28354: --
28355:
28356: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28357: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28358: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
28359: end if;
28360: l_min_esd := greatest(l_min_esd,r_EQG_unique.information2);
28361: /**********************moved up from here **********************
28354: --
28355:
28356: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28357: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28358: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
28359: end if;
28360: l_min_esd := greatest(l_min_esd,r_EQG_unique.information2);
28361: /**********************moved up from here **********************
28362: open c_EQG(r_EQG_unique.table_route_id,
28390: p_from_date => l_min_esd,
28391: p_to_date => l_max_eed );
28392: if l_dt_rec_found THEN
28393: --END TEMPIK
28394: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28395: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28391: p_to_date => l_max_eed );
28392: if l_dt_rec_found THEN
28393: --END TEMPIK
28394: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28395: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28399: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28392: if l_dt_rec_found THEN
28393: --END TEMPIK
28394: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28395: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28399: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28400: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28393: --END TEMPIK
28394: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28395: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28399: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28400: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28401: --
28394: if r_EQG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28395: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28399: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28400: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28401: --
28402: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28395: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_QUA_IN_GR_PRTE_ID' then
28396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28399: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28400: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28401: --
28402: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28403: --
28396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG_unique.information1 ;
28398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28399: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28400: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28401: --
28402: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28403: --
28404: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28398: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28399: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28400: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28401: --
28402: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28403: --
28404: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28405: end if ;
28406: --
28400: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28401: --
28402: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28403: --
28404: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28405: end if ;
28406: --
28407: l_object_found_in_target := true ;
28408: --TEMPIK
28436: end if ;
28437: --
28438:
28439: l_effective_date := r_EQG.information2;
28440: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28441: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28442: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
28443: end if;
28444:
28437: --
28438:
28439: l_effective_date := r_EQG.information2;
28440: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28441: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28442: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
28443: end if;
28444:
28445: if l_first_rec and not l_update then
28438:
28439: l_effective_date := r_EQG.information2;
28440: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28441: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28442: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
28443: end if;
28444:
28445: if l_first_rec and not l_update then
28446: -- Call Create routine.
28501: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
28502: -- Update all relevent cer records with new pk_id
28503: hr_utility.set_location('Before plsql table ',222);
28504: hr_utility.set_location('new_value id '||l_elig_qua_in_gr_prte_id,222);
28505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG.information1 ;
28507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUA_IN_GR_PRTE_ID ;
28508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28502: -- Update all relevent cer records with new pk_id
28503: hr_utility.set_location('Before plsql table ',222);
28504: hr_utility.set_location('new_value id '||l_elig_qua_in_gr_prte_id,222);
28505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG.information1 ;
28507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUA_IN_GR_PRTE_ID ;
28508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28510: hr_utility.set_location('After plsql table ',222);
28503: hr_utility.set_location('Before plsql table ',222);
28504: hr_utility.set_location('new_value id '||l_elig_qua_in_gr_prte_id,222);
28505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG.information1 ;
28507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUA_IN_GR_PRTE_ID ;
28508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28510: hr_utility.set_location('After plsql table ',222);
28511: --
28504: hr_utility.set_location('new_value id '||l_elig_qua_in_gr_prte_id,222);
28505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG.information1 ;
28507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUA_IN_GR_PRTE_ID ;
28508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28510: hr_utility.set_location('After plsql table ',222);
28511: --
28512: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_QUA_IN_GR_PRTE_ID' ;
28506: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EQG.information1 ;
28507: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_QUA_IN_GR_PRTE_ID ;
28508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28510: hr_utility.set_location('After plsql table ',222);
28511: --
28512: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28513: --
28508: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
28509: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EQG_unique.table_route_id;
28510: hr_utility.set_location('After plsql table ',222);
28511: --
28512: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28513: --
28514: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28515: --
28516: else
28510: hr_utility.set_location('After plsql table ',222);
28511: --
28512: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28513: --
28514: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28515: --
28516: else
28517: --
28518: -- Call Update routine for the pk_id created in prev run .
28631: end loop;
28632: --
28633: exception when others then
28634: --
28635: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EQG',r_EQG.information5 ) ;
28636: --
28637: end create_EQG_rows;
28638:
28639: --
28776: end if ;
28777: -- End Prefix Sufix derivation
28778: for r_EGN_unique in c_unique_EGN('EGN') loop
28779:
28780: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
28781: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28782: r_EGN_unique.information3 >=
28783: ben_pd_copy_to_ben_one.g_copy_effective_date)
28784: ) then
28777: -- End Prefix Sufix derivation
28778: for r_EGN_unique in c_unique_EGN('EGN') loop
28779:
28780: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
28781: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28782: r_EGN_unique.information3 >=
28783: ben_pd_copy_to_ben_one.g_copy_effective_date)
28784: ) then
28785: --
28779:
28780: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
28781: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28782: r_EGN_unique.information3 >=
28783: ben_pd_copy_to_ben_one.g_copy_effective_date)
28784: ) then
28785: --
28786: hr_utility.set_location(' r_EGN_unique.table_route_id '||r_EGN_unique.table_route_id,10);
28787: hr_utility.set_location(' r_EGN_unique.information1 '||r_EGN_unique.information1,10);
28818: l_object_found_in_target := TRUE;
28819: --
28820: if l_process_date between r_EGN_unique.information2 and r_EGN_unique.information3 then
28821: l_update := true;
28822: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGN_unique.information1 ;
28819: --
28820: if l_process_date between r_EGN_unique.information2 and r_EGN_unique.information3 then
28821: l_update := true;
28822: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGN_unique.information1 ;
28827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28820: if l_process_date between r_EGN_unique.information2 and r_EGN_unique.information3 then
28821: l_update := true;
28822: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGN_unique.information1 ;
28827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28821: l_update := true;
28822: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGN_unique.information1 ;
28827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28829: --
28822: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGN_unique.information1 ;
28827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28829: --
28830: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28823: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGN_unique.information1 ;
28827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28829: --
28830: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28831: --
28824: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28825: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGN_unique.information1 ;
28827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28829: --
28830: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28831: --
28832: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28826: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EGN_unique.information1 ;
28827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28829: --
28830: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28831: --
28832: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28833: --
28834: -- log_data('EGN',l_new_value,l_prefix || r_EGN_unique.name|| l_suffix,'REUSED');
28828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28829: --
28830: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
28831: --
28832: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28833: --
28834: -- log_data('EGN',l_new_value,l_prefix || r_EGN_unique.name|| l_suffix,'REUSED');
28835: --
28836: end if ;
28849: open c_EGN_min_max_dates(r_EGN_unique.table_route_id, r_EGN_unique.information1 ) ;
28850: fetch c_EGN_min_max_dates into l_min_esd,l_max_eed ;
28851: --
28852:
28853: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28854: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28855: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
28856: end if;
28857: l_min_esd := greatest(l_min_esd,r_EGN_unique.information2);
28850: fetch c_EGN_min_max_dates into l_min_esd,l_max_eed ;
28851: --
28852:
28853: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28854: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28855: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
28856: end if;
28857: l_min_esd := greatest(l_min_esd,r_EGN_unique.information2);
28858: /**********************moved up from here **********************
28851: --
28852:
28853: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28854: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28855: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
28856: end if;
28857: l_min_esd := greatest(l_min_esd,r_EGN_unique.information2);
28858: /**********************moved up from here **********************
28859: open c_EGN(r_EGN_unique.table_route_id,
28888: p_from_date => l_min_esd,
28889: p_to_date => l_max_eed );
28890: if l_dt_rec_found THEN
28891: --END TEMPIK
28892: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28893: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28889: p_to_date => l_max_eed );
28890: if l_dt_rec_found THEN
28891: --END TEMPIK
28892: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28893: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28890: if l_dt_rec_found THEN
28891: --END TEMPIK
28892: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28893: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28891: --END TEMPIK
28892: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28893: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28899: --
28892: if r_EGN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
28893: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28899: --
28900: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28893: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_GNDR_PRTE_ID' then
28894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28899: --
28900: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28901: --
28894: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
28895: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN_unique.information1 ;
28896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28899: --
28900: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28901: --
28902: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28896: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
28897: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
28898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28899: --
28900: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28901: --
28902: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28903: end if ;
28904: --
28898: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
28899: --
28900: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
28901: --
28902: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
28903: end if ;
28904: --
28905: l_object_found_in_target := true ;
28906: --TEMPIK
28934: end if ;
28935: --
28936:
28937: l_effective_date := r_EGN.information2;
28938: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28939: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28940: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
28941: end if;
28942:
28935: --
28936:
28937: l_effective_date := r_EGN.information2;
28938: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28939: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28940: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
28941: end if;
28942:
28943: if l_first_rec and not l_update then
28936:
28937: l_effective_date := r_EGN.information2;
28938: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
28939: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
28940: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
28941: end if;
28942:
28943: if l_first_rec and not l_update then
28944: -- Call Create routine.
28999: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
29000: -- Update all relevent cer records with new pk_id
29001: hr_utility.set_location('Before plsql table ',222);
29002: hr_utility.set_location('new_value id '||l_elig_gndr_prte_id,222);
29003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
29004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN.information1 ;
29005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GNDR_PRTE_ID ;
29006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
29000: -- Update all relevent cer records with new pk_id
29001: hr_utility.set_location('Before plsql table ',222);
29002: hr_utility.set_location('new_value id '||l_elig_gndr_prte_id,222);
29003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
29004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN.information1 ;
29005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GNDR_PRTE_ID ;
29006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
29008: hr_utility.set_location('After plsql table ',222);
29001: hr_utility.set_location('Before plsql table ',222);
29002: hr_utility.set_location('new_value id '||l_elig_gndr_prte_id,222);
29003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
29004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN.information1 ;
29005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GNDR_PRTE_ID ;
29006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
29008: hr_utility.set_location('After plsql table ',222);
29009: --
29002: hr_utility.set_location('new_value id '||l_elig_gndr_prte_id,222);
29003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
29004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN.information1 ;
29005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GNDR_PRTE_ID ;
29006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
29008: hr_utility.set_location('After plsql table ',222);
29009: --
29010: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29003: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_GNDR_PRTE_ID' ;
29004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EGN.information1 ;
29005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_GNDR_PRTE_ID ;
29006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
29008: hr_utility.set_location('After plsql table ',222);
29009: --
29010: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29011: --
29006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EGN_unique.table_route_id;
29008: hr_utility.set_location('After plsql table ',222);
29009: --
29010: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29011: --
29012: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29013: --
29014: else
29008: hr_utility.set_location('After plsql table ',222);
29009: --
29010: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29011: --
29012: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29013: --
29014: else
29015: --
29016: -- Call Update routine for the pk_id created in prev run .
29129: end loop;
29130: --
29131: exception when others then
29132: --
29133: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EGN',r_EGN.information5 ) ;
29134: --
29135: end create_EGN_rows;
29136:
29137: --
29271: end if ;
29272: -- End Prefix Sufix derivation
29273: for r_ETU_unique in c_unique_ETU('ETU') loop
29274:
29275: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
29276: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29277: r_ETU_unique.information3 >=
29278: ben_pd_copy_to_ben_one.g_copy_effective_date)
29279: ) then
29272: -- End Prefix Sufix derivation
29273: for r_ETU_unique in c_unique_ETU('ETU') loop
29274:
29275: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
29276: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29277: r_ETU_unique.information3 >=
29278: ben_pd_copy_to_ben_one.g_copy_effective_date)
29279: ) then
29280: --
29274:
29275: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
29276: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29277: r_ETU_unique.information3 >=
29278: ben_pd_copy_to_ben_one.g_copy_effective_date)
29279: ) then
29280: --
29281: hr_utility.set_location(' r_ETU_unique.table_route_id '||r_ETU_unique.table_route_id,10);
29282: hr_utility.set_location(' r_ETU_unique.information1 '||r_ETU_unique.information1,10);
29311: l_object_found_in_target := TRUE;
29312: --
29313: if l_process_date between r_ETU_unique.information2 and r_ETU_unique.information3 then
29314: l_update := true;
29315: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29316: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETU_unique.information1 ;
29312: --
29313: if l_process_date between r_ETU_unique.information2 and r_ETU_unique.information3 then
29314: l_update := true;
29315: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29316: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETU_unique.information1 ;
29320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29313: if l_process_date between r_ETU_unique.information2 and r_ETU_unique.information3 then
29314: l_update := true;
29315: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29316: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETU_unique.information1 ;
29320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29314: l_update := true;
29315: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29316: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETU_unique.information1 ;
29320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29322: --
29315: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29316: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETU_unique.information1 ;
29320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29322: --
29323: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29316: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETU_unique.information1 ;
29320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29322: --
29323: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29324: --
29317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETU_unique.information1 ;
29320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29322: --
29323: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29324: --
29325: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETU_unique.information1 ;
29320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29322: --
29323: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29324: --
29325: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29326: --
29327: -- log_data('ETU',l_new_value,l_prefix || r_ETU_unique.name|| l_suffix,'REUSED');
29321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29322: --
29323: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29324: --
29325: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29326: --
29327: -- log_data('ETU',l_new_value,l_prefix || r_ETU_unique.name|| l_suffix,'REUSED');
29328: --
29329: end if ;
29342: open c_ETU_min_max_dates(r_ETU_unique.table_route_id, r_ETU_unique.information1 ) ;
29343: fetch c_ETU_min_max_dates into l_min_esd,l_max_eed ;
29344: --
29345:
29346: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29347: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29348: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
29349: end if;
29350: l_min_esd := greatest(l_min_esd,r_ETU_unique.information2);
29343: fetch c_ETU_min_max_dates into l_min_esd,l_max_eed ;
29344: --
29345:
29346: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29347: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29348: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
29349: end if;
29350: l_min_esd := greatest(l_min_esd,r_ETU_unique.information2);
29351: /**********************moved up from here **********************
29344: --
29345:
29346: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29347: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29348: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
29349: end if;
29350: l_min_esd := greatest(l_min_esd,r_ETU_unique.information2);
29351: /**********************moved up from here **********************
29352: open c_ETU(r_ETU_unique.table_route_id,
29379: p_from_date => l_min_esd,
29380: p_to_date => l_max_eed );
29381: if l_dt_rec_found THEN
29382: --END TEMPIK
29383: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29384: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29380: p_to_date => l_max_eed );
29381: if l_dt_rec_found THEN
29382: --END TEMPIK
29383: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29384: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29381: if l_dt_rec_found THEN
29382: --END TEMPIK
29383: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29384: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29382: --END TEMPIK
29383: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29384: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29390: --
29383: if r_ETU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29384: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29390: --
29391: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29384: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TBCO_USE_PRTE_ID' then
29385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29390: --
29391: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29392: --
29385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU_unique.information1 ;
29387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29390: --
29391: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29392: --
29393: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29390: --
29391: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29392: --
29393: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29394: end if ;
29395: --
29389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29390: --
29391: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29392: --
29393: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29394: end if ;
29395: --
29396: l_object_found_in_target := true ;
29397: --TEMPIK
29425: end if ;
29426: --
29427:
29428: l_effective_date := r_ETU.information2;
29429: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29430: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29431: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
29432: end if;
29433:
29426: --
29427:
29428: l_effective_date := r_ETU.information2;
29429: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29430: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29431: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
29432: end if;
29433:
29434: if l_first_rec and not l_update then
29427:
29428: l_effective_date := r_ETU.information2;
29429: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29430: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29431: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
29432: end if;
29433:
29434: if l_first_rec and not l_update then
29435: -- Call Create routine.
29490: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
29491: -- Update all relevent cer records with new pk_id
29492: hr_utility.set_location('Before plsql table ',222);
29493: hr_utility.set_location('new_value id '||l_elig_tbco_use_prte_id,222);
29494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU.information1 ;
29496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TBCO_USE_PRTE_ID ;
29497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29491: -- Update all relevent cer records with new pk_id
29492: hr_utility.set_location('Before plsql table ',222);
29493: hr_utility.set_location('new_value id '||l_elig_tbco_use_prte_id,222);
29494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU.information1 ;
29496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TBCO_USE_PRTE_ID ;
29497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29499: hr_utility.set_location('After plsql table ',222);
29492: hr_utility.set_location('Before plsql table ',222);
29493: hr_utility.set_location('new_value id '||l_elig_tbco_use_prte_id,222);
29494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU.information1 ;
29496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TBCO_USE_PRTE_ID ;
29497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29499: hr_utility.set_location('After plsql table ',222);
29500: --
29493: hr_utility.set_location('new_value id '||l_elig_tbco_use_prte_id,222);
29494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU.information1 ;
29496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TBCO_USE_PRTE_ID ;
29497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29499: hr_utility.set_location('After plsql table ',222);
29500: --
29501: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TBCO_USE_PRTE_ID' ;
29495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETU.information1 ;
29496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TBCO_USE_PRTE_ID ;
29497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29499: hr_utility.set_location('After plsql table ',222);
29500: --
29501: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29502: --
29497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETU_unique.table_route_id;
29499: hr_utility.set_location('After plsql table ',222);
29500: --
29501: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29502: --
29503: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29504: --
29505: else
29499: hr_utility.set_location('After plsql table ',222);
29500: --
29501: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29502: --
29503: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29504: --
29505: else
29506: --
29507: -- Call Update routine for the pk_id created in prev run .
29620: end loop;
29621: --
29622: exception when others then
29623: --
29624: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ETU',r_ETU.information5 ) ;
29625: --
29626: end create_ETU_rows;
29627:
29628: --
29762: end if ;
29763: -- End Prefix Sufix derivation
29764: for r_EDB_unique in c_unique_EDB('EDB') loop
29765:
29766: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
29767: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29768: r_EDB_unique.information3 >=
29769: ben_pd_copy_to_ben_one.g_copy_effective_date)
29770: ) then
29763: -- End Prefix Sufix derivation
29764: for r_EDB_unique in c_unique_EDB('EDB') loop
29765:
29766: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
29767: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29768: r_EDB_unique.information3 >=
29769: ben_pd_copy_to_ben_one.g_copy_effective_date)
29770: ) then
29771: --
29765:
29766: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
29767: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29768: r_EDB_unique.information3 >=
29769: ben_pd_copy_to_ben_one.g_copy_effective_date)
29770: ) then
29771: --
29772: hr_utility.set_location(' r_EDB_unique.table_route_id '||r_EDB_unique.table_route_id,10);
29773: hr_utility.set_location(' r_EDB_unique.information1 '||r_EDB_unique.information1,10);
29803: l_object_found_in_target := TRUE;
29804: --
29805: if l_process_date between r_EDB_unique.information2 and r_EDB_unique.information3 then
29806: l_update := true;
29807: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29808: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29809: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29810: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDB_unique.information1 ;
29804: --
29805: if l_process_date between r_EDB_unique.information2 and r_EDB_unique.information3 then
29806: l_update := true;
29807: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29808: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29809: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29810: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDB_unique.information1 ;
29812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29805: if l_process_date between r_EDB_unique.information2 and r_EDB_unique.information3 then
29806: l_update := true;
29807: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29808: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29809: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29810: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDB_unique.information1 ;
29812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29806: l_update := true;
29807: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29808: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29809: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29810: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDB_unique.information1 ;
29812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29814: --
29807: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29808: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29809: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29810: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDB_unique.information1 ;
29812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29814: --
29815: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29808: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29809: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29810: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDB_unique.information1 ;
29812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29814: --
29815: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29816: --
29809: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29810: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDB_unique.information1 ;
29812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29814: --
29815: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29816: --
29817: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDB_unique.information1 ;
29812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29814: --
29815: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29816: --
29817: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29818: --
29819: -- log_data('EDB',l_new_value,l_prefix || r_EDB_unique.name|| l_suffix,'REUSED');
29813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29814: --
29815: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29816: --
29817: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29818: --
29819: -- log_data('EDB',l_new_value,l_prefix || r_EDB_unique.name|| l_suffix,'REUSED');
29820: --
29821: end if ;
29834: open c_EDB_min_max_dates(r_EDB_unique.table_route_id, r_EDB_unique.information1 ) ;
29835: fetch c_EDB_min_max_dates into l_min_esd,l_max_eed ;
29836: --
29837:
29838: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29839: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29840: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
29841: end if;
29842: l_min_esd := greatest(l_min_esd,r_EDB_unique.information2);
29835: fetch c_EDB_min_max_dates into l_min_esd,l_max_eed ;
29836: --
29837:
29838: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29839: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29840: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
29841: end if;
29842: l_min_esd := greatest(l_min_esd,r_EDB_unique.information2);
29843: /**********************moved up from here **********************
29836: --
29837:
29838: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29839: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29840: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
29841: end if;
29842: l_min_esd := greatest(l_min_esd,r_EDB_unique.information2);
29843: /**********************moved up from here **********************
29844: open c_EDB(r_EDB_unique.table_route_id,
29871: p_from_date => l_min_esd,
29872: p_to_date => l_max_eed );
29873: if l_dt_rec_found THEN
29874: --END TEMPI
29875: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29876: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29872: p_to_date => l_max_eed );
29873: if l_dt_rec_found THEN
29874: --END TEMPI
29875: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29876: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29873: if l_dt_rec_found THEN
29874: --END TEMPI
29875: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29876: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29874: --END TEMPI
29875: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29876: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29882: --
29875: if r_EDB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
29876: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29882: --
29883: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29876: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_PRTE_ID' then
29877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29882: --
29883: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29884: --
29877: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29878: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB_unique.information1 ;
29879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29882: --
29883: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29884: --
29885: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29879: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
29880: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
29881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29882: --
29883: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29884: --
29885: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29886: end if ;
29887: --
29881: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29882: --
29883: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
29884: --
29885: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29886: end if ;
29887: --
29888: l_object_found_in_target := true ;
29889: --TEMPIK
29917: end if ;
29918: --
29919:
29920: l_effective_date := r_EDB.information2;
29921: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29922: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29923: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
29924: end if;
29925:
29918: --
29919:
29920: l_effective_date := r_EDB.information2;
29921: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29922: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29923: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
29924: end if;
29925:
29926: if l_first_rec and not l_update then
29919:
29920: l_effective_date := r_EDB.information2;
29921: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
29922: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
29923: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
29924: end if;
29925:
29926: if l_first_rec and not l_update then
29927: -- Call Create routine.
29982: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
29983: -- Update all relevent cer records with new pk_id
29984: hr_utility.set_location('Before plsql table ',222);
29985: hr_utility.set_location('new_value id '||l_elig_dsbld_prte_id,222);
29986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB.information1 ;
29988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLD_PRTE_ID ;
29989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29983: -- Update all relevent cer records with new pk_id
29984: hr_utility.set_location('Before plsql table ',222);
29985: hr_utility.set_location('new_value id '||l_elig_dsbld_prte_id,222);
29986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB.information1 ;
29988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLD_PRTE_ID ;
29989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29991: hr_utility.set_location('After plsql table ',222);
29984: hr_utility.set_location('Before plsql table ',222);
29985: hr_utility.set_location('new_value id '||l_elig_dsbld_prte_id,222);
29986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB.information1 ;
29988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLD_PRTE_ID ;
29989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29991: hr_utility.set_location('After plsql table ',222);
29992: --
29985: hr_utility.set_location('new_value id '||l_elig_dsbld_prte_id,222);
29986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB.information1 ;
29988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLD_PRTE_ID ;
29989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29991: hr_utility.set_location('After plsql table ',222);
29992: --
29993: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_PRTE_ID' ;
29987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDB.information1 ;
29988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_DSBLD_PRTE_ID ;
29989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29991: hr_utility.set_location('After plsql table ',222);
29992: --
29993: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29994: --
29989: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
29990: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDB_unique.table_route_id;
29991: hr_utility.set_location('After plsql table ',222);
29992: --
29993: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29994: --
29995: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29996: --
29997: else
29991: hr_utility.set_location('After plsql table ',222);
29992: --
29993: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
29994: --
29995: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
29996: --
29997: else
29998: --
29999: -- Call Update routine for the pk_id created in prev run .
30112: end loop;
30113: --
30114: exception when others then
30115: --
30116: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EDB',r_EDB.information5 ) ;
30117: --
30118: end create_EDB_rows;
30119:
30120: --
30274: end if ;
30275: -- End Prefix Sufix derivation
30276: for r_ETP_unique in c_unique_ETP('ETP') loop
30277:
30278: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
30279: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30280: r_ETP_unique.information3 >=
30281: ben_pd_copy_to_ben_one.g_copy_effective_date)
30282: ) then
30275: -- End Prefix Sufix derivation
30276: for r_ETP_unique in c_unique_ETP('ETP') loop
30277:
30278: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
30279: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30280: r_ETP_unique.information3 >=
30281: ben_pd_copy_to_ben_one.g_copy_effective_date)
30282: ) then
30283: --
30277:
30278: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
30279: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30280: r_ETP_unique.information3 >=
30281: ben_pd_copy_to_ben_one.g_copy_effective_date)
30282: ) then
30283: --
30284: hr_utility.set_location(' r_ETP_unique.table_route_id '||r_ETP_unique.table_route_id,10);
30285: hr_utility.set_location(' r_ETP_unique.information1 '||r_ETP_unique.information1,10);
30321: l_object_found_in_target := TRUE;
30322: --
30323: if l_process_date between r_ETP_unique.information2 and r_ETP_unique.information3 then
30324: l_update := true;
30325: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETP_unique.information1 ;
30322: --
30323: if l_process_date between r_ETP_unique.information2 and r_ETP_unique.information3 then
30324: l_update := true;
30325: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETP_unique.information1 ;
30330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30323: if l_process_date between r_ETP_unique.information2 and r_ETP_unique.information3 then
30324: l_update := true;
30325: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETP_unique.information1 ;
30330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30324: l_update := true;
30325: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETP_unique.information1 ;
30330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30332: --
30325: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETP_unique.information1 ;
30330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30332: --
30333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30326: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETP_unique.information1 ;
30330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30332: --
30333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30334: --
30327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETP_unique.information1 ;
30330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30332: --
30333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30334: --
30335: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETP_unique.information1 ;
30330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30332: --
30333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30334: --
30335: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30336: --
30337: -- log_data('ETP',l_new_value,l_prefix || r_ETP_unique.name|| l_suffix,'REUSED');
30331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30332: --
30333: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30334: --
30335: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30336: --
30337: -- log_data('ETP',l_new_value,l_prefix || r_ETP_unique.name|| l_suffix,'REUSED');
30338: --
30339: end if ;
30352: open c_ETP_min_max_dates(r_ETP_unique.table_route_id, r_ETP_unique.information1 ) ;
30353: fetch c_ETP_min_max_dates into l_min_esd,l_max_eed ;
30354: --
30355:
30356: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30357: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30358: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
30359: end if;
30360: l_min_esd := greatest(l_min_esd,r_ETP_unique.information2);
30353: fetch c_ETP_min_max_dates into l_min_esd,l_max_eed ;
30354: --
30355:
30356: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30357: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30358: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
30359: end if;
30360: l_min_esd := greatest(l_min_esd,r_ETP_unique.information2);
30361: /**********************moved up from here **********************
30354: --
30355:
30356: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30357: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30358: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
30359: end if;
30360: l_min_esd := greatest(l_min_esd,r_ETP_unique.information2);
30361: /**********************moved up from here **********************
30362: open c_ETP(r_ETP_unique.table_route_id,
30395: p_from_date => l_min_esd,
30396: p_to_date => l_max_eed );
30397: if l_dt_rec_found THEN
30398: --END TEMPIK
30399: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30400: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30401: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30396: p_to_date => l_max_eed );
30397: if l_dt_rec_found THEN
30398: --END TEMPIK
30399: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30400: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30401: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30397: if l_dt_rec_found THEN
30398: --END TEMPIK
30399: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30400: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30401: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30398: --END TEMPIK
30399: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30400: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30401: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30406: --
30399: if r_ETP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30400: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30401: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30406: --
30407: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30400: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_PRTT_PRTE_ID' then
30401: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30406: --
30407: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30408: --
30401: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30402: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP_unique.information1 ;
30403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30406: --
30407: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30408: --
30409: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30403: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30404: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30406: --
30407: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30408: --
30409: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30410: end if ;
30411: --
30405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30406: --
30407: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30408: --
30409: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30410: end if ;
30411: --
30412: l_object_found_in_target := true ;
30413: --TEMPIK
30441: end if ;
30442: --
30443:
30444: l_effective_date := r_ETP.information2;
30445: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30446: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30447: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
30448: end if;
30449:
30442: --
30443:
30444: l_effective_date := r_ETP.information2;
30445: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30446: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30447: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
30448: end if;
30449:
30450: if l_first_rec and not l_update then
30443:
30444: l_effective_date := r_ETP.information2;
30445: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30446: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30447: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
30448: end if;
30449:
30450: if l_first_rec and not l_update then
30451: -- Call Create routine.
30509: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
30510: -- Update all relevent cer records with new pk_id
30511: hr_utility.set_location('Before plsql table ',222);
30512: hr_utility.set_location('new_value id '||l_elig_ttl_prtt_prte_id,222);
30513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30514: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP.information1 ;
30515: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_PRTT_PRTE_ID ;
30516: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
30517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30510: -- Update all relevent cer records with new pk_id
30511: hr_utility.set_location('Before plsql table ',222);
30512: hr_utility.set_location('new_value id '||l_elig_ttl_prtt_prte_id,222);
30513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30514: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP.information1 ;
30515: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_PRTT_PRTE_ID ;
30516: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
30517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30518: hr_utility.set_location('After plsql table ',222);
30511: hr_utility.set_location('Before plsql table ',222);
30512: hr_utility.set_location('new_value id '||l_elig_ttl_prtt_prte_id,222);
30513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30514: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP.information1 ;
30515: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_PRTT_PRTE_ID ;
30516: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
30517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30518: hr_utility.set_location('After plsql table ',222);
30519: --
30512: hr_utility.set_location('new_value id '||l_elig_ttl_prtt_prte_id,222);
30513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30514: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP.information1 ;
30515: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_PRTT_PRTE_ID ;
30516: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
30517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30518: hr_utility.set_location('After plsql table ',222);
30519: --
30520: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30513: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_PRTT_PRTE_ID' ;
30514: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETP.information1 ;
30515: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_PRTT_PRTE_ID ;
30516: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
30517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30518: hr_utility.set_location('After plsql table ',222);
30519: --
30520: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30521: --
30516: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
30517: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETP_unique.table_route_id;
30518: hr_utility.set_location('After plsql table ',222);
30519: --
30520: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30521: --
30522: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30523: --
30524: else
30518: hr_utility.set_location('After plsql table ',222);
30519: --
30520: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30521: --
30522: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30523: --
30524: else
30525: --
30526: -- Call Update routine for the pk_id created in prev run .
30642: end loop;
30643: --
30644: exception when others then
30645: --
30646: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ETP',r_ETP.information5 ) ;
30647: --
30648: end create_ETP_rows;
30649:
30650: --
30804: end if ;
30805: -- End Prefix Sufix derivation
30806: for r_ETC_unique in c_unique_ETC('ETC') loop
30807:
30808: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
30809: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30810: r_ETC_unique.information3 >=
30811: ben_pd_copy_to_ben_one.g_copy_effective_date)
30812: ) then
30805: -- End Prefix Sufix derivation
30806: for r_ETC_unique in c_unique_ETC('ETC') loop
30807:
30808: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
30809: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30810: r_ETC_unique.information3 >=
30811: ben_pd_copy_to_ben_one.g_copy_effective_date)
30812: ) then
30813: --
30807:
30808: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
30809: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30810: r_ETC_unique.information3 >=
30811: ben_pd_copy_to_ben_one.g_copy_effective_date)
30812: ) then
30813: --
30814: hr_utility.set_location(' r_ETC_unique.table_route_id '||r_ETC_unique.table_route_id,10);
30815: hr_utility.set_location(' r_ETC_unique.information1 '||r_ETC_unique.information1,10);
30851: l_object_found_in_target := TRUE;
30852: --
30853: if l_process_date between r_ETC_unique.information2 and r_ETC_unique.information3 then
30854: l_update := true;
30855: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30856: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETC_unique.information1 ;
30852: --
30853: if l_process_date between r_ETC_unique.information2 and r_ETC_unique.information3 then
30854: l_update := true;
30855: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30856: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETC_unique.information1 ;
30860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30853: if l_process_date between r_ETC_unique.information2 and r_ETC_unique.information3 then
30854: l_update := true;
30855: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30856: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETC_unique.information1 ;
30860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30854: l_update := true;
30855: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30856: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETC_unique.information1 ;
30860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30862: --
30855: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30856: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETC_unique.information1 ;
30860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30862: --
30863: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30856: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETC_unique.information1 ;
30860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30862: --
30863: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30864: --
30857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETC_unique.information1 ;
30860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30862: --
30863: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30864: --
30865: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ETC_unique.information1 ;
30860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30862: --
30863: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30864: --
30865: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30866: --
30867: -- log_data('ETC',l_new_value,l_prefix || r_ETC_unique.name|| l_suffix,'REUSED');
30861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30862: --
30863: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
30864: --
30865: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30866: --
30867: -- log_data('ETC',l_new_value,l_prefix || r_ETC_unique.name|| l_suffix,'REUSED');
30868: --
30869: end if ;
30882: open c_ETC_min_max_dates(r_ETC_unique.table_route_id, r_ETC_unique.information1 ) ;
30883: fetch c_ETC_min_max_dates into l_min_esd,l_max_eed ;
30884: --
30885:
30886: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30887: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30888: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
30889: end if;
30890: l_min_esd := greatest(l_min_esd,r_ETC_unique.information2);
30883: fetch c_ETC_min_max_dates into l_min_esd,l_max_eed ;
30884: --
30885:
30886: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30887: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30888: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
30889: end if;
30890: l_min_esd := greatest(l_min_esd,r_ETC_unique.information2);
30891: /**********************moved up from here **********************
30884: --
30885:
30886: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30887: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30888: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
30889: end if;
30890: l_min_esd := greatest(l_min_esd,r_ETC_unique.information2);
30891: /**********************moved up from here **********************
30892: open c_ETC(r_ETC_unique.table_route_id,
30926: p_from_date => l_min_esd,
30927: p_to_date => l_max_eed );
30928: if l_dt_rec_found THEN
30929: --END TEMPIK
30930: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30927: p_to_date => l_max_eed );
30928: if l_dt_rec_found THEN
30929: --END TEMPIK
30930: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30928: if l_dt_rec_found THEN
30929: --END TEMPIK
30930: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30929: --END TEMPIK
30930: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30937: --
30930: if r_ETC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
30931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30937: --
30938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TTL_CVG_VOL_PRTE_ID' then
30932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30937: --
30938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30939: --
30932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
30933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC_unique.information1 ;
30934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30937: --
30938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30939: --
30940: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
30935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
30936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30937: --
30938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30939: --
30940: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30941: end if ;
30942: --
30936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
30937: --
30938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
30939: --
30940: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
30941: end if ;
30942: --
30943: l_object_found_in_target := true ;
30944: --TEMPIK
30972: end if ;
30973: --
30974:
30975: l_effective_date := r_ETC.information2;
30976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30977: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30978: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
30979: end if;
30980:
30973: --
30974:
30975: l_effective_date := r_ETC.information2;
30976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30977: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30978: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
30979: end if;
30980:
30981: if l_first_rec and not l_update then
30974:
30975: l_effective_date := r_ETC.information2;
30976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
30977: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
30978: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
30979: end if;
30980:
30981: if l_first_rec and not l_update then
30982: -- Call Create routine.
31040: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
31041: -- Update all relevent cer records with new pk_id
31042: hr_utility.set_location('Before plsql table ',222);
31043: hr_utility.set_location('new_value id '||l_elig_ttl_cvg_vol_prte_id,222);
31044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
31045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC.information1 ;
31046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_CVG_VOL_PRTE_ID ;
31047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
31041: -- Update all relevent cer records with new pk_id
31042: hr_utility.set_location('Before plsql table ',222);
31043: hr_utility.set_location('new_value id '||l_elig_ttl_cvg_vol_prte_id,222);
31044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
31045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC.information1 ;
31046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_CVG_VOL_PRTE_ID ;
31047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
31049: hr_utility.set_location('After plsql table ',222);
31042: hr_utility.set_location('Before plsql table ',222);
31043: hr_utility.set_location('new_value id '||l_elig_ttl_cvg_vol_prte_id,222);
31044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
31045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC.information1 ;
31046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_CVG_VOL_PRTE_ID ;
31047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
31049: hr_utility.set_location('After plsql table ',222);
31050: --
31043: hr_utility.set_location('new_value id '||l_elig_ttl_cvg_vol_prte_id,222);
31044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
31045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC.information1 ;
31046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_CVG_VOL_PRTE_ID ;
31047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
31049: hr_utility.set_location('After plsql table ',222);
31050: --
31051: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TTL_CVG_VOL_PRTE_ID' ;
31045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ETC.information1 ;
31046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TTL_CVG_VOL_PRTE_ID ;
31047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
31049: hr_utility.set_location('After plsql table ',222);
31050: --
31051: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31052: --
31047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ETC_unique.table_route_id;
31049: hr_utility.set_location('After plsql table ',222);
31050: --
31051: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31052: --
31053: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31054: --
31055: else
31049: hr_utility.set_location('After plsql table ',222);
31050: --
31051: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31052: --
31053: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31054: --
31055: else
31056: --
31057: -- Call Update routine for the pk_id created in prev run .
31173: end loop;
31174: --
31175: exception when others then
31176: --
31177: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ETC',r_ETC.information5 ) ;
31178: --
31179: end create_ETC_rows;
31180: --
31181: ---------------------------------------------------------------
31317: end if ;
31318: -- End Prefix Sufix derivation
31319: for r_EHC_unique in c_unique_EHC('EHC') loop
31320:
31321: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
31322: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31323: r_EHC_unique.information3 >=
31324: ben_pd_copy_to_ben_one.g_copy_effective_date)
31325: ) then
31318: -- End Prefix Sufix derivation
31319: for r_EHC_unique in c_unique_EHC('EHC') loop
31320:
31321: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
31322: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31323: r_EHC_unique.information3 >=
31324: ben_pd_copy_to_ben_one.g_copy_effective_date)
31325: ) then
31326: --
31320:
31321: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
31322: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31323: r_EHC_unique.information3 >=
31324: ben_pd_copy_to_ben_one.g_copy_effective_date)
31325: ) then
31326: --
31327: hr_utility.set_location(' r_EHC_unique.table_route_id '||r_EHC_unique.table_route_id,10);
31328: hr_utility.set_location(' r_EHC_unique.information1 '||r_EHC_unique.information1,10);
31364: l_object_found_in_target := TRUE;
31365: --
31366: if l_process_date between r_EHC_unique.information2 and r_EHC_unique.information3 then
31367: l_update := true;
31368: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31369: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHC_unique.information1 ;
31365: --
31366: if l_process_date between r_EHC_unique.information2 and r_EHC_unique.information3 then
31367: l_update := true;
31368: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31369: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHC_unique.information1 ;
31373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31366: if l_process_date between r_EHC_unique.information2 and r_EHC_unique.information3 then
31367: l_update := true;
31368: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31369: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHC_unique.information1 ;
31373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31367: l_update := true;
31368: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31369: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHC_unique.information1 ;
31373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31375: --
31368: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31369: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHC_unique.information1 ;
31373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31375: --
31376: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31369: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHC_unique.information1 ;
31373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31375: --
31376: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31377: --
31370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHC_unique.information1 ;
31373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31375: --
31376: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31377: --
31378: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EHC_unique.information1 ;
31373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31375: --
31376: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31377: --
31378: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31379: --
31380: -- log_data('EHC',l_new_value,l_prefix || r_EHC_unique.name|| l_suffix,'REUSED');
31374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31375: --
31376: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31377: --
31378: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31379: --
31380: -- log_data('EHC',l_new_value,l_prefix || r_EHC_unique.name|| l_suffix,'REUSED');
31381: --
31382: end if ;
31395: open c_EHC_min_max_dates(r_EHC_unique.table_route_id, r_EHC_unique.information1 ) ;
31396: fetch c_EHC_min_max_dates into l_min_esd,l_max_eed ;
31397: --
31398:
31399: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31400: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31401: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
31402: end if;
31403: l_min_esd := greatest(l_min_esd,r_EHC_unique.information2);
31396: fetch c_EHC_min_max_dates into l_min_esd,l_max_eed ;
31397: --
31398:
31399: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31400: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31401: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
31402: end if;
31403: l_min_esd := greatest(l_min_esd,r_EHC_unique.information2);
31404: /**********************moved up from here **********************
31397: --
31398:
31399: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31400: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31401: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
31402: end if;
31403: l_min_esd := greatest(l_min_esd,r_EHC_unique.information2);
31404: /**********************moved up from here **********************
31405: open c_EHC(r_EHC_unique.table_route_id,
31439: p_from_date => l_min_esd,
31440: p_to_date => l_max_eed );
31441: if l_dt_rec_found THEN
31442: --END TEMPIK
31443: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31440: p_to_date => l_max_eed );
31441: if l_dt_rec_found THEN
31442: --END TEMPIK
31443: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31441: if l_dt_rec_found THEN
31442: --END TEMPIK
31443: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31442: --END TEMPIK
31443: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31450: --
31443: if r_EHC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31450: --
31451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_HLTH_CVG_PRTE_ID' then
31445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31450: --
31451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31452: --
31445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC_unique.information1 ;
31447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31450: --
31451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31452: --
31453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31450: --
31451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31452: --
31453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31454: end if ;
31455: --
31449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31450: --
31451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31452: --
31453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31454: end if ;
31455: --
31456: l_object_found_in_target := true ;
31457: --TEMPIK
31485: end if ;
31486: --
31487:
31488: l_effective_date := r_EHC.information2;
31489: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31490: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31491: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
31492: end if;
31493:
31486: --
31487:
31488: l_effective_date := r_EHC.information2;
31489: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31490: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31491: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
31492: end if;
31493:
31494: if l_first_rec and not l_update then
31487:
31488: l_effective_date := r_EHC.information2;
31489: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31490: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31491: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
31492: end if;
31493:
31494: if l_first_rec and not l_update then
31495: -- Call Create routine.
31545: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
31546: -- Update all relevent cer records with new pk_id
31547: hr_utility.set_location('Before plsql table ',222);
31548: hr_utility.set_location('new_value id '||l_elig_hlth_cvg_prte_id,222);
31549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC.information1 ;
31551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HLTH_CVG_PRTE_ID ;
31552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31546: -- Update all relevent cer records with new pk_id
31547: hr_utility.set_location('Before plsql table ',222);
31548: hr_utility.set_location('new_value id '||l_elig_hlth_cvg_prte_id,222);
31549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC.information1 ;
31551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HLTH_CVG_PRTE_ID ;
31552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31554: hr_utility.set_location('After plsql table ',222);
31547: hr_utility.set_location('Before plsql table ',222);
31548: hr_utility.set_location('new_value id '||l_elig_hlth_cvg_prte_id,222);
31549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC.information1 ;
31551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HLTH_CVG_PRTE_ID ;
31552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31554: hr_utility.set_location('After plsql table ',222);
31555: --
31548: hr_utility.set_location('new_value id '||l_elig_hlth_cvg_prte_id,222);
31549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC.information1 ;
31551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HLTH_CVG_PRTE_ID ;
31552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31554: hr_utility.set_location('After plsql table ',222);
31555: --
31556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_HLTH_CVG_PRTE_ID' ;
31550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EHC.information1 ;
31551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_HLTH_CVG_PRTE_ID ;
31552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31554: hr_utility.set_location('After plsql table ',222);
31555: --
31556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31557: --
31552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
31553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EHC_unique.table_route_id;
31554: hr_utility.set_location('After plsql table ',222);
31555: --
31556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31557: --
31558: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31559: --
31560: else
31554: hr_utility.set_location('After plsql table ',222);
31555: --
31556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31557: --
31558: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31559: --
31560: else
31561: --
31562: -- Call Update routine for the pk_id created in prev run .
31671: end loop;
31672: --
31673: exception when others then
31674: --
31675: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EHC',r_EHC.information5 ) ;
31676: --
31677: end create_EHC_rows;
31678:
31679: ---------------------------------------------------------------
31811: end if ;
31812: -- End Prefix Sufix derivation
31813: for r_EOP_unique in c_unique_EOP('EOP') loop
31814:
31815: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
31816: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31817: r_EOP_unique.information3 >=
31818: ben_pd_copy_to_ben_one.g_copy_effective_date)
31819: ) then
31812: -- End Prefix Sufix derivation
31813: for r_EOP_unique in c_unique_EOP('EOP') loop
31814:
31815: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
31816: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31817: r_EOP_unique.information3 >=
31818: ben_pd_copy_to_ben_one.g_copy_effective_date)
31819: ) then
31820: --
31814:
31815: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
31816: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31817: r_EOP_unique.information3 >=
31818: ben_pd_copy_to_ben_one.g_copy_effective_date)
31819: ) then
31820: --
31821: hr_utility.set_location(' r_EOP_unique.table_route_id '||r_EOP_unique.table_route_id,10);
31822: hr_utility.set_location(' r_EOP_unique.information1 '||r_EOP_unique.information1,10);
31855: l_object_found_in_target := TRUE;
31856: --
31857: if l_process_date between r_EOP_unique.information2 and r_EOP_unique.information3 then
31858: l_update := true;
31859: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOP_unique.information1 ;
31856: --
31857: if l_process_date between r_EOP_unique.information2 and r_EOP_unique.information3 then
31858: l_update := true;
31859: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOP_unique.information1 ;
31864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31857: if l_process_date between r_EOP_unique.information2 and r_EOP_unique.information3 then
31858: l_update := true;
31859: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOP_unique.information1 ;
31864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31858: l_update := true;
31859: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOP_unique.information1 ;
31864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31866: --
31859: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOP_unique.information1 ;
31864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31866: --
31867: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31860: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOP_unique.information1 ;
31864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31866: --
31867: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31868: --
31861: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOP_unique.information1 ;
31864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31866: --
31867: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31868: --
31869: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EOP_unique.information1 ;
31864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31866: --
31867: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31868: --
31869: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31870: --
31871: -- log_data('EOP',l_new_value,l_prefix || r_EOP_unique.name|| l_suffix,'REUSED');
31865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31866: --
31867: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
31868: --
31869: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31870: --
31871: -- log_data('EOP',l_new_value,l_prefix || r_EOP_unique.name|| l_suffix,'REUSED');
31872: --
31873: end if ;
31886: open c_EOP_min_max_dates(r_EOP_unique.table_route_id, r_EOP_unique.information1 ) ;
31887: fetch c_EOP_min_max_dates into l_min_esd,l_max_eed ;
31888: --
31889:
31890: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31891: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31892: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
31893: end if;
31894: l_min_esd := greatest(l_min_esd,r_EOP_unique.information2);
31887: fetch c_EOP_min_max_dates into l_min_esd,l_max_eed ;
31888: --
31889:
31890: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31891: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31892: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
31893: end if;
31894: l_min_esd := greatest(l_min_esd,r_EOP_unique.information2);
31895: /**********************moved up from here **********************
31888: --
31889:
31890: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31891: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31892: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
31893: end if;
31894: l_min_esd := greatest(l_min_esd,r_EOP_unique.information2);
31895: /**********************moved up from here **********************
31896: open c_EOP(r_EOP_unique.table_route_id,
31926: p_from_date => l_min_esd,
31927: p_to_date => l_max_eed );
31928: if l_dt_rec_found THEN
31929: --END TEMPIK
31930: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31927: p_to_date => l_max_eed );
31928: if l_dt_rec_found THEN
31929: --END TEMPIK
31930: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31928: if l_dt_rec_found THEN
31929: --END TEMPIK
31930: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31929: --END TEMPIK
31930: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31937: --
31930: if r_EOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
31931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31937: --
31938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31931: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_ANTHR_PL_PRTE_ID' then
31932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31937: --
31938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31939: --
31932: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
31933: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP_unique.information1 ;
31934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31937: --
31938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31939: --
31940: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31934: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
31935: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
31936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31937: --
31938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31939: --
31940: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31941: end if ;
31942: --
31936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
31937: --
31938: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
31939: --
31940: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
31941: end if ;
31942: --
31943: l_object_found_in_target := true ;
31944: --TEMPIK
31972: end if ;
31973: --
31974:
31975: l_effective_date := r_EOP.information2;
31976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31977: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31978: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
31979: end if;
31980:
31973: --
31974:
31975: l_effective_date := r_EOP.information2;
31976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31977: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31978: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
31979: end if;
31980:
31981: if l_first_rec and not l_update then
31974:
31975: l_effective_date := r_EOP.information2;
31976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
31977: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
31978: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
31979: end if;
31980:
31981: if l_first_rec and not l_update then
31982: -- Call Create routine.
32031: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
32032: -- Update all relevent cer records with new pk_id
32033: hr_utility.set_location('Before plsql table ',222);
32034: hr_utility.set_location('new_value id '||l_elig_anthr_pl_prte_id,222);
32035: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
32036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP.information1 ;
32037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ANTHR_PL_PRTE_ID ;
32038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
32039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
32032: -- Update all relevent cer records with new pk_id
32033: hr_utility.set_location('Before plsql table ',222);
32034: hr_utility.set_location('new_value id '||l_elig_anthr_pl_prte_id,222);
32035: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
32036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP.information1 ;
32037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ANTHR_PL_PRTE_ID ;
32038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
32039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
32040: hr_utility.set_location('After plsql table ',222);
32033: hr_utility.set_location('Before plsql table ',222);
32034: hr_utility.set_location('new_value id '||l_elig_anthr_pl_prte_id,222);
32035: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
32036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP.information1 ;
32037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ANTHR_PL_PRTE_ID ;
32038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
32039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
32040: hr_utility.set_location('After plsql table ',222);
32041: --
32034: hr_utility.set_location('new_value id '||l_elig_anthr_pl_prte_id,222);
32035: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
32036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP.information1 ;
32037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ANTHR_PL_PRTE_ID ;
32038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
32039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
32040: hr_utility.set_location('After plsql table ',222);
32041: --
32042: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32035: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_ANTHR_PL_PRTE_ID' ;
32036: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EOP.information1 ;
32037: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_ANTHR_PL_PRTE_ID ;
32038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
32039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
32040: hr_utility.set_location('After plsql table ',222);
32041: --
32042: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32043: --
32038: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
32039: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EOP_unique.table_route_id;
32040: hr_utility.set_location('After plsql table ',222);
32041: --
32042: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32043: --
32044: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
32045: --
32046: else
32040: hr_utility.set_location('After plsql table ',222);
32041: --
32042: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32043: --
32044: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
32045: --
32046: else
32047: --
32048: -- Call Update routine for the pk_id created in prev run .
32156: end loop;
32157: --
32158: exception when others then
32159: --
32160: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EOP',r_EOP.information5 ) ;
32161: --
32162: end create_EOP_rows;
32163: --
32164: -- Bug 4169120 : Rate By Criteria
32575: -- THEN
32576: --
32577: FOR r_ecv_unique IN c_unique_ecv ('ECV')
32578: LOOP
32579: IF ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NULL
32580: OR ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NOT NULL
32581: AND r_ecv_unique.information3 >=
32582: ben_pd_copy_to_ben_one.g_copy_effective_date
32583: )
32576: --
32577: FOR r_ecv_unique IN c_unique_ecv ('ECV')
32578: LOOP
32579: IF ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NULL
32580: OR ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NOT NULL
32581: AND r_ecv_unique.information3 >=
32582: ben_pd_copy_to_ben_one.g_copy_effective_date
32583: )
32584: )
32578: LOOP
32579: IF ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NULL
32580: OR ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NOT NULL
32581: AND r_ecv_unique.information3 >=
32582: ben_pd_copy_to_ben_one.g_copy_effective_date
32583: )
32584: )
32585: THEN
32586: --
32625: --
32626: l_update := TRUE;
32627: --
32628: IF r_ecv_unique.information1
32629: <> NVL (ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count - 1).old_value, -999 )
32630: OR NVL (ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count - 1).pk_id_column, '999')
32631: <> 'ELIGY_CRIT_VALUES_ID'
32632: THEN
32633: --
32626: l_update := TRUE;
32627: --
32628: IF r_ecv_unique.information1
32629: <> NVL (ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count - 1).old_value, -999 )
32630: OR NVL (ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count - 1).pk_id_column, '999')
32631: <> 'ELIGY_CRIT_VALUES_ID'
32632: THEN
32633: --
32634: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column :='ELIGY_CRIT_VALUES_ID';
32630: OR NVL (ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count - 1).pk_id_column, '999')
32631: <> 'ELIGY_CRIT_VALUES_ID'
32632: THEN
32633: --
32634: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column :='ELIGY_CRIT_VALUES_ID';
32635: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32636: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := r_ecv_unique.information1;
32637: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32638: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32631: <> 'ELIGY_CRIT_VALUES_ID'
32632: THEN
32633: --
32634: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column :='ELIGY_CRIT_VALUES_ID';
32635: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32636: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := r_ecv_unique.information1;
32637: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32638: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32639: --
32632: THEN
32633: --
32634: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column :='ELIGY_CRIT_VALUES_ID';
32635: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32636: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := r_ecv_unique.information1;
32637: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32638: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32639: --
32640: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32633: --
32634: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column :='ELIGY_CRIT_VALUES_ID';
32635: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32636: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := r_ecv_unique.information1;
32637: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32638: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32639: --
32640: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32641: --
32634: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column :='ELIGY_CRIT_VALUES_ID';
32635: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32636: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := r_ecv_unique.information1;
32637: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32638: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32639: --
32640: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32641: --
32642: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1;
32636: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := r_ecv_unique.information1;
32637: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32638: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32639: --
32640: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32641: --
32642: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1;
32643: --
32644: -- log_data('ecv',l_new_value,l_prefix || r_ecv_unique.name|| l_suffix,'REUSED');
32638: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32639: --
32640: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32641: --
32642: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1;
32643: --
32644: -- log_data('ecv',l_new_value,l_prefix || r_ecv_unique.name|| l_suffix,'REUSED');
32645: --
32646: END IF;
32661: r_ecv_unique.information1
32662: );
32663: FETCH c_ecv_min_max_dates INTO l_min_esd, l_max_eed;
32664: --
32665: IF ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NOT NULL
32666: AND l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date
32667: )
32668: THEN
32669: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
32662: );
32663: FETCH c_ecv_min_max_dates INTO l_min_esd, l_max_eed;
32664: --
32665: IF ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NOT NULL
32666: AND l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date
32667: )
32668: THEN
32669: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
32670: END IF;
32665: IF ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NOT NULL
32666: AND l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date
32667: )
32668: THEN
32669: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
32670: END IF;
32671:
32672: l_min_esd := GREATEST (l_min_esd, r_ecv_unique.information2);
32673:
32696:
32697: IF l_dt_rec_found
32698: THEN
32699: IF r_ecv_unique.information1 <>
32700: NVL (ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count - 1).old_value, -999)
32701: OR NVL (ben_pd_copy_to_ben_one.g_pk_tbl ( ben_pd_copy_to_ben_one.g_count - 1).pk_id_column, '999')
32702: <> 'ELIGY_CRIT_VALUES_ID'
32703: THEN
32704: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32697: IF l_dt_rec_found
32698: THEN
32699: IF r_ecv_unique.information1 <>
32700: NVL (ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count - 1).old_value, -999)
32701: OR NVL (ben_pd_copy_to_ben_one.g_pk_tbl ( ben_pd_copy_to_ben_one.g_count - 1).pk_id_column, '999')
32702: <> 'ELIGY_CRIT_VALUES_ID'
32703: THEN
32704: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32705: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32700: NVL (ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count - 1).old_value, -999)
32701: OR NVL (ben_pd_copy_to_ben_one.g_pk_tbl ( ben_pd_copy_to_ben_one.g_count - 1).pk_id_column, '999')
32702: <> 'ELIGY_CRIT_VALUES_ID'
32703: THEN
32704: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32705: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32706: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_new_value;
32707: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32708: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32701: OR NVL (ben_pd_copy_to_ben_one.g_pk_tbl ( ben_pd_copy_to_ben_one.g_count - 1).pk_id_column, '999')
32702: <> 'ELIGY_CRIT_VALUES_ID'
32703: THEN
32704: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32705: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32706: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_new_value;
32707: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32708: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32709: --
32702: <> 'ELIGY_CRIT_VALUES_ID'
32703: THEN
32704: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32705: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32706: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_new_value;
32707: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32708: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32709: --
32710: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
32703: THEN
32704: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32705: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32706: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_new_value;
32707: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32708: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32709: --
32710: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
32711: --
32704: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32705: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv_unique.information1;
32706: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_new_value;
32707: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32708: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32709: --
32710: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
32711: --
32712: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1;
32706: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_new_value;
32707: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
32708: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32709: --
32710: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
32711: --
32712: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1;
32713: END IF;
32714:
32708: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32709: --
32710: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
32711: --
32712: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1;
32713: END IF;
32714:
32715: --
32716: l_object_found_in_target := TRUE;
32747: END IF;
32748: --
32749: l_effective_date := r_ecv.information2;
32750: --
32751: IF ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NOT NULL
32752: AND l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date
32753: )
32754: THEN
32755: --
32748: --
32749: l_effective_date := r_ecv.information2;
32750: --
32751: IF ( ben_pd_copy_to_ben_one.g_copy_effective_date IS NOT NULL
32752: AND l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date
32753: )
32754: THEN
32755: --
32756: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
32752: AND l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date
32753: )
32754: THEN
32755: --
32756: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
32757: --
32758: END IF;
32759: --
32760: --
32871: --
32872: hr_utility.set_location ('Before plsql table ', 222);
32873: hr_utility.set_location ('new_value id ' || l_eligy_crit_values_id, 222);
32874: --
32875: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32876: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv.information1;
32877: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_eligy_crit_values_id;
32878: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
32879: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32872: hr_utility.set_location ('Before plsql table ', 222);
32873: hr_utility.set_location ('new_value id ' || l_eligy_crit_values_id, 222);
32874: --
32875: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32876: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv.information1;
32877: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_eligy_crit_values_id;
32878: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
32879: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32880: --
32873: hr_utility.set_location ('new_value id ' || l_eligy_crit_values_id, 222);
32874: --
32875: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32876: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv.information1;
32877: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_eligy_crit_values_id;
32878: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
32879: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32880: --
32881: hr_utility.set_location ('After plsql table ', 222);
32874: --
32875: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32876: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv.information1;
32877: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_eligy_crit_values_id;
32878: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
32879: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32880: --
32881: hr_utility.set_location ('After plsql table ', 222);
32882: --
32875: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIGY_CRIT_VALUES_ID';
32876: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).old_value := r_ecv.information1;
32877: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).new_value := l_eligy_crit_values_id;
32878: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
32879: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32880: --
32881: hr_utility.set_location ('After plsql table ', 222);
32882: --
32883: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32879: ben_pd_copy_to_ben_one.g_pk_tbl (ben_pd_copy_to_ben_one.g_count).table_route_id := r_ecv_unique.table_route_id;
32880: --
32881: hr_utility.set_location ('After plsql table ', 222);
32882: --
32883: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32884: --
32885: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1;
32886: --
32887: ELSE
32881: hr_utility.set_location ('After plsql table ', 222);
32882: --
32883: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
32884: --
32885: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1;
32886: --
32887: ELSE
32888: --
32889: -- Call Update routine for the pk_id created in prev run .
33103: EXCEPTION
33104: WHEN OTHERS
33105: THEN
33106: --
33107: ben_pd_copy_to_ben_one.raise_error_message ('ecv', r_ecv.information5);
33108: --
33109: END create_ecv_rows;
33110: --
33111: --
33136: fetch c_source_business_group into l_source_business_group_id;
33137: --
33138: close c_source_business_group;
33139: --
33140: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EAN') then
33141: create_EAN_rows(
33142: p_validate => p_validate
33143: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33144: ,p_effective_date => p_effective_date
33148: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33149: end if;
33150: --
33151: --
33152: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CGP') then
33153: create_CGP_rows(
33154: p_validate => p_validate
33155: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33156: ,p_effective_date => p_effective_date
33159: ,p_target_business_group_id => p_target_business_group_id
33160: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33161: end if;
33162: --
33163: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EAP') then
33164: create_EAP_rows(
33165: p_validate => p_validate
33166: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33167: ,p_effective_date => p_effective_date
33170: ,p_target_business_group_id => p_target_business_group_id
33171: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33172: end if;
33173: --
33174: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EBN') then
33175: create_EBN_rows(
33176: p_validate => p_validate
33177: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33178: ,p_effective_date => p_effective_date
33181: ,p_target_business_group_id => p_target_business_group_id
33182: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33183: end if;
33184: --
33185: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EBU') then
33186: create_EBU_rows(
33187: p_validate => p_validate
33188: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33189: ,p_effective_date => p_effective_date
33192: ,p_target_business_group_id => p_target_business_group_id
33193: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33194: end if;
33195: --
33196: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ECL') then
33197: create_ECL_rows(
33198: p_validate => p_validate
33199: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33200: ,p_effective_date => p_effective_date
33203: ,p_target_business_group_id => p_target_business_group_id
33204: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33205: end if;
33206: --
33207: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ECP') then
33208: create_ECP_rows(
33209: p_validate => p_validate
33210: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33211: ,p_effective_date => p_effective_date
33215: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33216: end if;
33217: --
33218:
33219: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ECY') then
33220: create_ECY_rows(
33221: p_validate => p_validate
33222: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33223: ,p_effective_date => p_effective_date
33226: ,p_target_business_group_id => p_target_business_group_id
33227: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33228: end if;
33229: --
33230: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ERL') then
33231: create_ERL_rows(
33232: p_validate => p_validate
33233: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33234: ,p_effective_date => p_effective_date
33237: ,p_target_business_group_id => p_target_business_group_id
33238: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33239: end if;
33240: --
33241: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EHW') then
33242: create_EHW_rows(
33243: p_validate => p_validate
33244: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33245: ,p_effective_date => p_effective_date
33248: ,p_target_business_group_id => p_target_business_group_id
33249: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33250: end if;
33251: --
33252: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EJP') then
33253: create_EJP_rows(
33254: p_validate => p_validate
33255: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33256: ,p_effective_date => p_effective_date
33259: ,p_target_business_group_id => p_target_business_group_id
33260: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33261: end if;
33262: --
33263: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ELU') then
33264: create_ELU_rows(
33265: p_validate => p_validate
33266: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33267: ,p_effective_date => p_effective_date
33270: ,p_target_business_group_id => p_target_business_group_id
33271: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33272: end if;
33273: --
33274: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ELN') then
33275: create_ELN_rows(
33276: p_validate => p_validate
33277: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33278: ,p_effective_date => p_effective_date
33281: ,p_target_business_group_id => p_target_business_group_id
33282: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33283: end if;
33284: --
33285: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ELR') then
33286: create_ELR_rows(
33287: p_validate => p_validate
33288: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33289: ,p_effective_date => p_effective_date
33292: ,p_target_business_group_id => p_target_business_group_id
33293: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33294: end if;
33295: --
33296: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ELS') then
33297: create_ELS_rows(
33298: p_validate => p_validate
33299: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33300: ,p_effective_date => p_effective_date
33303: ,p_target_business_group_id => p_target_business_group_id
33304: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33305: end if;
33306: --
33307: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ELV') then
33308: create_ELV_rows(
33309: p_validate => p_validate
33310: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33311: ,p_effective_date => p_effective_date
33314: ,p_target_business_group_id => p_target_business_group_id
33315: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33316: end if;
33317: --
33318: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EMP') then
33319: create_EMP_rows(
33320: p_validate => p_validate
33321: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33322: ,p_effective_date => p_effective_date
33325: ,p_target_business_group_id => p_target_business_group_id
33326: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33327: end if;
33328: --
33329: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ENO') then
33330: create_ENO_rows(
33331: p_validate => p_validate
33332: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33333: ,p_effective_date => p_effective_date
33336: ,p_target_business_group_id => p_target_business_group_id
33337: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33338: end if;
33339: --
33340: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EOM') then
33341: create_EOM_rows(
33342: p_validate => p_validate
33343: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33344: ,p_effective_date => p_effective_date
33347: ,p_target_business_group_id => p_target_business_group_id
33348: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33349: end if;
33350: --
33351: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EOU') then
33352: create_EOU_rows(
33353: p_validate => p_validate
33354: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33355: ,p_effective_date => p_effective_date
33358: ,p_target_business_group_id => p_target_business_group_id
33359: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33360: end if;
33361: --
33362: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPF') then
33363: create_EPF_rows(
33364: p_validate => p_validate
33365: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33366: ,p_effective_date => p_effective_date
33369: ,p_target_business_group_id => p_target_business_group_id
33370: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33371: end if;
33372:
33373: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPT') then
33374: create_EPT_rows(
33375: p_validate => p_validate
33376: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33377: ,p_effective_date => p_effective_date
33380: ,p_target_business_group_id => p_target_business_group_id
33381: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33382: end if;
33383: --
33384: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPB') then
33385: create_EPB_rows(
33386: p_validate => p_validate
33387: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33388: ,p_effective_date => p_effective_date
33391: ,p_target_business_group_id => p_target_business_group_id
33392: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33393: end if;
33394: --
33395: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPN') then
33396: create_EPN_rows(
33397: p_validate => p_validate
33398: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33399: ,p_effective_date => p_effective_date
33402: ,p_target_business_group_id => p_target_business_group_id
33403: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33404: end if;
33405: --
33406: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPS') then
33407: create_EPS_rows(
33408: p_validate => p_validate
33409: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33410: ,p_effective_date => p_effective_date
33413: ,p_target_business_group_id => p_target_business_group_id
33414: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33415: end if;
33416: --
33417: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPY') then
33418: create_EPY_rows(
33419: p_validate => p_validate
33420: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33421: ,p_effective_date => p_effective_date
33424: ,p_target_business_group_id => p_target_business_group_id
33425: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33426: end if;
33427: --
33428: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPZ') then
33429: create_EPZ_rows(
33430: p_validate => p_validate
33431: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33432: ,p_effective_date => p_effective_date
33435: ,p_target_business_group_id => p_target_business_group_id
33436: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33437: end if;
33438: --
33439: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EQT') then
33440: create_EQT_rows(
33441: p_validate => p_validate
33442: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33443: ,p_effective_date => p_effective_date
33448: end if;
33449: --
33450:
33451:
33452: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ESA') then
33453: create_ESA_rows(
33454: p_validate => p_validate
33455: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33456: ,p_effective_date => p_effective_date
33460: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33461:
33462: end if;
33463: --
33464: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ESH') then
33465: create_ESH_rows(
33466: p_validate => p_validate
33467: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33468: ,p_effective_date => p_effective_date
33471: ,p_target_business_group_id => p_target_business_group_id
33472: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33473: end if;
33474: --
33475: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ESP') then
33476: create_ESP_rows(
33477: p_validate => p_validate
33478: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33479: ,p_effective_date => p_effective_date
33482: ,p_target_business_group_id => p_target_business_group_id
33483: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33484: end if;
33485: --
33486: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EST') then
33487: create_EST_rows(
33488: p_validate => p_validate
33489: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33490: ,p_effective_date => p_effective_date
33493: ,p_target_business_group_id => p_target_business_group_id
33494: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33495: end if;
33496: --
33497: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EWL') then
33498: create_EWL_rows(
33499: p_validate => p_validate
33500: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33501: ,p_effective_date => p_effective_date
33504: ,p_target_business_group_id => p_target_business_group_id
33505: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33506: end if;
33507: --
33508: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ECT') then
33509: create_ECT_rows(
33510: p_validate => p_validate
33511: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33512: ,p_effective_date => p_effective_date
33515: ,p_target_business_group_id => p_target_business_group_id
33516: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33517: end if;
33518: --
33519: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EDD') then
33520: create_EDD_rows(
33521: p_validate => p_validate
33522: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33523: ,p_effective_date => p_effective_date
33526: ,p_target_business_group_id => p_target_business_group_id
33527: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33528: end if;
33529: --
33530: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EDR') then
33531: create_EDR_rows(
33532: p_validate => p_validate
33533: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33534: ,p_effective_date => p_effective_date
33537: ,p_target_business_group_id => p_target_business_group_id
33538: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33539: end if;
33540: --
33541: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EES') then
33542: create_EES_rows(
33543: p_validate => p_validate
33544: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33545: ,p_effective_date => p_effective_date
33548: ,p_target_business_group_id => p_target_business_group_id
33549: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33550: end if;
33551: --
33552: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EFP') then
33553: create_EFP_rows(
33554: p_validate => p_validate
33555: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33556: ,p_effective_date => p_effective_date
33559: ,p_target_business_group_id => p_target_business_group_id
33560: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33561: end if;
33562: --
33563: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EGR') then
33564: create_EGR_rows(
33565: p_validate => p_validate
33566: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33567: ,p_effective_date => p_effective_date
33570: ,p_target_business_group_id => p_target_business_group_id
33571: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33572: end if;
33573: --
33574: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EHS') then
33575: create_EHS_rows(
33576: p_validate => p_validate
33577: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33578: ,p_effective_date => p_effective_date
33581: ,p_target_business_group_id => p_target_business_group_id
33582: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33583: end if;
33584: --
33585: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ERG') then
33586: create_ERG_rows(
33587: p_validate => p_validate
33588: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33589: ,p_effective_date => p_effective_date
33592: ,p_target_business_group_id => p_target_business_group_id
33593: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33594: end if;
33595: --
33596: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EQG') then
33597: create_EQG_rows(
33598: p_validate => p_validate
33599: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33600: ,p_effective_date => p_effective_date
33603: ,p_target_business_group_id => p_target_business_group_id
33604: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33605: end if;
33606: --
33607: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EGN') then
33608: create_EGN_rows(
33609: p_validate => p_validate
33610: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33611: ,p_effective_date => p_effective_date
33614: ,p_target_business_group_id => p_target_business_group_id
33615: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33616: end if;
33617: --
33618: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ETU') then
33619: create_ETU_rows(
33620: p_validate => p_validate
33621: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33622: ,p_effective_date => p_effective_date
33626: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33627:
33628: end if;
33629: --
33630: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EDB') then
33631: create_EDB_rows(
33632: p_validate => p_validate
33633: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33634: ,p_effective_date => p_effective_date
33638: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33639:
33640: end if;
33641: --
33642: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ETP') then
33643: create_ETP_rows(
33644: p_validate => p_validate
33645: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33646: ,p_effective_date => p_effective_date
33650: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33651:
33652: end if;
33653: --
33654: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ETC') then
33655: create_ETC_rows(
33656: p_validate => p_validate
33657: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33658: ,p_effective_date => p_effective_date
33663: end if;
33664: --
33665: -- Bug 4169120 : Rate By Criteria
33666: --
33667: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ECV')
33668: then
33669: --
33670: create_ECV_rows(
33671: p_validate => p_validate
33680: --
33681: --
33682: -- Foll. Criteria to be copied only in Create Plan Wizard flow
33683: --
33684: if BEN_PD_COPY_TO_BEN_ONE.g_transaction_category = 'BEN_PDCRWZ' then
33685:
33686: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ECQ') then
33687: create_ECQ_rows(
33688: p_validate => p_validate
33682: -- Foll. Criteria to be copied only in Create Plan Wizard flow
33683: --
33684: if BEN_PD_COPY_TO_BEN_ONE.g_transaction_category = 'BEN_PDCRWZ' then
33685:
33686: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ECQ') then
33687: create_ECQ_rows(
33688: p_validate => p_validate
33689: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33690: ,p_effective_date => p_effective_date
33693: ,p_target_business_group_id => p_target_business_group_id
33694: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33695: end if;
33696: --
33697: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EDG') then
33698: create_EDG_rows(
33699: p_validate => p_validate
33700: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33701: ,p_effective_date => p_effective_date
33704: ,p_target_business_group_id => p_target_business_group_id
33705: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33706: end if;
33707: --
33708: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EDI') then
33709: create_EDI_rows(
33710: p_validate => p_validate
33711: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33712: ,p_effective_date => p_effective_date
33715: ,p_target_business_group_id => p_target_business_group_id
33716: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33717: end if;
33718: --
33719: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EDP') then
33720: create_EDP_rows(
33721: p_validate => p_validate
33722: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33723: ,p_effective_date => p_effective_date
33726: ,p_target_business_group_id => p_target_business_group_id
33727: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33728: end if;
33729: --
33730: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EDT') then
33731: create_EDT_rows(
33732: p_validate => p_validate
33733: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33734: ,p_effective_date => p_effective_date
33737: ,p_target_business_group_id => p_target_business_group_id
33738: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33739: end if;
33740: --
33741: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EOY') then
33742: create_EOY_rows(
33743: p_validate => p_validate
33744: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33745: ,p_effective_date => p_effective_date
33748: ,p_target_business_group_id => p_target_business_group_id
33749: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33750: end if;
33751: --
33752: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPG') then
33753: create_EPG_rows(
33754: p_validate => p_validate
33755: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33756: ,p_effective_date => p_effective_date
33759: ,p_target_business_group_id => p_target_business_group_id
33760: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33761: end if;
33762: --
33763: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPP') then
33764: create_EPP_rows(
33765: p_validate => p_validate
33766: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33767: ,p_effective_date => p_effective_date
33770: ,p_target_business_group_id => p_target_business_group_id
33771: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33772: end if;
33773: --
33774: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ETD') then
33775: create_ETD_rows(
33776: p_validate => p_validate
33777: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33778: ,p_effective_date => p_effective_date
33781: ,p_target_business_group_id => p_target_business_group_id
33782: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33783: end if;
33784: --
33785: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EEI') then
33786: create_EEI_rows(
33787: p_validate => p_validate
33788: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33789: ,p_effective_date => p_effective_date
33792: ,p_target_business_group_id => p_target_business_group_id
33793: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33794: end if;
33795: --
33796: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EEG') then
33797: create_EEG_rows(
33798: p_validate => p_validate
33799: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33800: ,p_effective_date => p_effective_date
33803: ,p_target_business_group_id => p_target_business_group_id
33804: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33805: end if;
33806: --
33807: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EAI') then
33808: create_EAI_rows(
33809: p_validate => p_validate
33810: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33811: ,p_effective_date => p_effective_date
33814: ,p_target_business_group_id => p_target_business_group_id
33815: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33816: end if;
33817: --
33818: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EEP') then
33819: create_EEP_rows(
33820: p_validate => p_validate
33821: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33822: ,p_effective_date => p_effective_date
33825: ,p_target_business_group_id => p_target_business_group_id
33826: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33827: end if;
33828: --
33829: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EET') then
33830: create_EET_rows(
33831: p_validate => p_validate
33832: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33833: ,p_effective_date => p_effective_date
33836: ,p_target_business_group_id => p_target_business_group_id
33837: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33838: end if;
33839: --
33840: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EHC') then
33841: create_EHC_rows(
33842: p_validate => p_validate
33843: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33844: ,p_effective_date => p_effective_date
33848: ,p_prefix_suffix_cd => p_prefix_suffix_cd );
33849:
33850: end if;
33851: --
33852: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EOP') then
33853: create_EOP_rows(
33854: p_validate => p_validate
33855: ,p_copy_entity_txn_id => p_copy_entity_txn_id
33856: ,p_effective_date => p_effective_date