1 package body SSP_SMP_RATE_UPLD as
2 /* $Header: ssprtupd.pkb 120.2 2011/05/20 08:10:07 pprvenka noship $
3 +==============================================================================+
4 | Copyright (c) 2011 Oracle Corporation |
5 | IDC Hyderabad, IN |
6 | All rights reserved. |
7 +==============================================================================+
8 --
9 Name
10 SSP/SMP Absence rates upload program
11 Purpose
12 To upload the statutory rates for absences spanning across tax years, when
13 the new rates for the Statutory absences are uploaded in the system.
14 History
15 19 May 2011 npannamp Created
16 This functionality is moved out of
17 perleggb.sql file to here from R12.2 onwards.
18 20 May 2011 pprvenka Included the default for p_debug.
19 */
20 --------------------------------------------------------------------------------
21 g_package constant varchar2 (31) := 'ssp_smp_rate_upld.';
22
23 --
24 procedure upd_abs_rates(errbuf OUT NOCOPY VARCHAR2,
25 retcode OUT NOCOPY NUMBER,
26 p_debug IN VARCHAR2 DEFAULT 'N')
27 IS
28 l_ssp_update_error boolean :=false;
29 l_job_err ssp_smp_support_pkg.l_job_err_typ;
30 begin
31 if ssp_ssp_pkg.ssp_is_installed
32 then
33
34 if (p_debug = 'Y')
35 then
36 hr_utility.trace_on(null,'REQID');
37 hr_utility.set_location('Entered '||g_package,1);
38 end if;
39
40 hr_utility.set_location('Entered '||g_package,1);
41
42 /* When Patching is in progress goto sleep mode until patching is complete. */
43 loop
44 hr_utility.set_location(g_package||'Inside while loop',10);
45 if ad_zd.get_edition('PATCH') is not null then
46 -- an online patch is in progress, goto sleep
47 hr_utility.set_location(g_package||'upd_abs_rates :AD_ZD'||ad_zd.get_edition('PATCH'),10);
48 dbms_lock.sleep(10);
49 end if;
50 exit when ad_zd.get_edition('PATCH') is null;
51 end loop;
52
53 ssp_smp_support_pkg.update_ssp_smp_entries (p_update_error => l_ssp_update_error,p_job_err => l_job_err);
54 if l_ssp_update_error
55 then
56 fnd_file.PUT_LINE(FND_FILE.OUTPUT, 'An error occurred whilst updating element entries for SSP/SMP.'
57 ||' Some of the SSP/SMP element entries could not be updated.'
58 ||' To help locate the problem, contact Oracle Support for details of'
59 ||' how to run the SSP/SMP entries update procedure manually with'
60 ||' PYUPIP trace.');
61 if l_job_err.count > 0 then
62 fnd_file.PUT_LINE(FND_FILE.OUTPUT, ' The Failed Absences are : ');
63
64 For I in 1..l_job_err.count
65 loop
66 fnd_file.PUT_LINE(FND_FILE.OUTPUT, l_job_err(I));
67 end loop;
68 end if;
69
70 else -- no ssp_update_error
71 fnd_file.PUT_LINE(FND_FILE.OUTPUT, 'No message');
72 end if;
73
74 else -- ssp not installed.
75 fnd_file.PUT_LINE(FND_FILE.OUTPUT,'SSP Product not installed.');
76 end if;
77
78 end upd_abs_rates;
79 end SSP_SMP_RATE_UPLD;