49: PROCEDURE debug
50: (p_trace_date IN DATE )
51: IS
52: BEGIN
53: debug(fnd_date.date_to_canonical(p_trace_date));
54: END debug;
55: --
56: --
57: --
451: debug_enter(l_proc_name);
452:
453: debug(TO_CHAR(g_effective_date,'DD-MON-YYYY'), 10);
454: debug('g_effective_date: '||
455: fnd_date.date_to_canonical(g_effective_date));
456:
457: g_effective_run_date := -- "end of day" of a day before effective date
458: fnd_date.canonical_to_date
459: (TO_CHAR(g_effective_date - 1,'YYYY/MM/DD')||'23:59:59');
454: debug('g_effective_date: '||
455: fnd_date.date_to_canonical(g_effective_date));
456:
457: g_effective_run_date := -- "end of day" of a day before effective date
458: fnd_date.canonical_to_date
459: (TO_CHAR(g_effective_date - 1,'YYYY/MM/DD')||'23:59:59');
460:
461: debug('g_effective_run_date: '||to_char(g_effective_run_date));
462:
463: OPEN csr_last_run_details;
464: FETCH csr_last_run_details INTO g_last_effective_date;
465:
466: debug('g_last_effective_date just after fetch: '||
467: fnd_date.date_to_canonical(g_last_effective_date), 30);
468:
469: IF csr_last_run_details%NOTFOUND -- not likely ever bcos of use of MAX
470: OR
471: g_last_effective_date IS NULL
497: END IF;
498: CLOSE csr_last_run_details;
499:
500: debug('g_last_effective_date: '||
501: fnd_date.date_to_canonical(g_last_effective_date),60);
502:
503: OPEN csr_next_run_details;
504: FETCH csr_next_run_details INTO g_next_effective_date;
505: CLOSE csr_next_run_details;
504: FETCH csr_next_run_details INTO g_next_effective_date;
505: CLOSE csr_next_run_details;
506:
507: debug('g_next_effective_date: '||
508: fnd_date.date_to_canonical(g_next_effective_date), 70);
509:
510: g_header_system_element:=
511: g_header_system_element||
512: fnd_date.date_to_canonical(g_last_effective_date)||':'||
508: fnd_date.date_to_canonical(g_next_effective_date), 70);
509:
510: g_header_system_element:=
511: g_header_system_element||
512: fnd_date.date_to_canonical(g_last_effective_date)||':'||
513: fnd_date.date_to_canonical(g_effective_run_date) ||':'||
514: fnd_date.date_to_canonical(g_next_effective_date)||':';
515:
516: debug('g_header_system_element: '||g_header_system_element, 80);
509:
510: g_header_system_element:=
511: g_header_system_element||
512: fnd_date.date_to_canonical(g_last_effective_date)||':'||
513: fnd_date.date_to_canonical(g_effective_run_date) ||':'||
514: fnd_date.date_to_canonical(g_next_effective_date)||':';
515:
516: debug('g_header_system_element: '||g_header_system_element, 80);
517:
510: g_header_system_element:=
511: g_header_system_element||
512: fnd_date.date_to_canonical(g_last_effective_date)||':'||
513: fnd_date.date_to_canonical(g_effective_run_date) ||':'||
514: fnd_date.date_to_canonical(g_next_effective_date)||':';
515:
516: debug('g_header_system_element: '||g_header_system_element, 80);
517:
518: -- Setting all the required date globals of tp1 package
548: pqp_gb_t1_pension_extracts.g_pension_year_start_date
549: := to_date('01/04/'||to_char(l_year), 'DD/MM/YYYY');
550:
551: debug('g_pension_year_start_date: '||
552: fnd_date.date_to_canonical(pqp_gb_t1_pension_extracts.g_pension_year_start_date),140);
553:
554: debug_exit(l_proc_name);
555: END set_run_effective_dates;
556: --
1666: BEGIN
1667: debug_enter(l_proc_name);
1668:
1669: debug('p_status: '||p_status);
1670: debug('p_start_date: '||fnd_date.date_to_canonical(p_start_date));
1671: debug('p_end_date: '||fnd_date.date_to_canonical(p_end_date));
1672:
1673: --
1674: -- Mark pay_process_events to process
1667: debug_enter(l_proc_name);
1668:
1669: debug('p_status: '||p_status);
1670: debug('p_start_date: '||fnd_date.date_to_canonical(p_start_date));
1671: debug('p_end_date: '||fnd_date.date_to_canonical(p_end_date));
1672:
1673: --
1674: -- Mark pay_process_events to process
1675: -- as determined by the date range. The maxmim allowed range
1980: l_error := pqp_gb_tp_extract_functions.raise_extract_warning
1981: (p_assignment_id => p_assignment_id
1982: ,p_error_text => 'BEN_94018_TPA_ALREADY_REPORTED'
1983: ,p_error_number => 94018
1984: ,p_token1 => fnd_date.date_to_displaydate(l_prev_start_date)
1985: );
1986: debug ('raised warning for Already reported with start_date:'||l_error,350);
1987: l_inclusion_flag := 'Y' ;
1988: ELSIF l_prev_start_date > l_earliest_start_date THEN
1990: l_error := pqp_gb_tp_extract_functions.raise_extract_warning
1991: (p_assignment_id => p_assignment_id
1992: ,p_error_text => 'BEN_94019_TPA_RPRTD_NEW_FOUND'
1993: ,p_error_number => 94019
1994: ,p_token1 => fnd_date.date_to_displaydate(l_prev_start_date)
1995: ,p_token2 => fnd_date.date_to_displaydate(l_earliest_start_date)
1996: );
1997: debug ('raised warning for Already reported with start_date:'||l_error,360);
1998: debug ('new starter found.........:'||l_error,370);
1991: (p_assignment_id => p_assignment_id
1992: ,p_error_text => 'BEN_94019_TPA_RPRTD_NEW_FOUND'
1993: ,p_error_number => 94019
1994: ,p_token1 => fnd_date.date_to_displaydate(l_prev_start_date)
1995: ,p_token2 => fnd_date.date_to_displaydate(l_earliest_start_date)
1996: );
1997: debug ('raised warning for Already reported with start_date:'||l_error,360);
1998: debug ('new starter found.........:'||l_error,370);
1999: l_inclusion_flag := 'Y' ;