[Home] [Help]
PACKAGE BODY: APPS.FII_TIME_ROLLING_PKG
Source
1 PACKAGE BODY FII_TIME_ROLLING_PKG AS
2 /*$Header: FIICMT3B.pls 120.1.12000000.1 2007/01/18 17:57:25 appldev ship $*/
3
4 g_debug_flag VARCHAR2(1) := NVL(FND_PROFILE.value('FII_DEBUG_MODE'), 'N');
5
6 PROCEDURE Load_Rolling_Offsets
7 ( o_error_msg OUT NOCOPY VARCHAR2,
8 o_error_code OUT NOCOPY VARCHAR2)
9 IS
10
11 l_user number;
12
13 BEGIN
14
15 l_user := FND_GLOBAL.USER_ID;
16
17 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
18 values ('FII_ROLLING_WEEK' ,'YEARLY', 0, -6, 0, sysdate, l_user, sysdate, l_user, l_user);
19 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
20 values ('FII_ROLLING_WEEK' ,'YEARLY', -7, -6,1, sysdate, l_user, sysdate, l_user, l_user);
21 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
22 values ('FII_ROLLING_WEEK' ,'YEARLY', -14, -6, 2, sysdate, l_user, sysdate, l_user, l_user);
23 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
24 values ('FII_ROLLING_WEEK' ,'YEARLY', -21, -6 , 3, sysdate, l_user, sysdate, l_user, l_user);
25 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
26 values ('FII_ROLLING_WEEK' ,'YEARLY', -28 , -6 , 4, sysdate, l_user, sysdate, l_user, l_user);
27 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
28 values ('FII_ROLLING_WEEK' ,'YEARLY', -35, -6 , 5, sysdate, l_user, sysdate, l_user, l_user);
29 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
30 values ('FII_ROLLING_WEEK' ,'YEARLY', -42, -6 , 6, sysdate, l_user, sysdate, l_user, l_user);
31 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
32 values ('FII_ROLLING_WEEK' ,'YEARLY', -49, -6 , 7, sysdate, l_user, sysdate, l_user, l_user);
33 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
34 values ('FII_ROLLING_WEEK' ,'YEARLY', -56, -6 , 8 , sysdate, l_user, sysdate, l_user, l_user);
35 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
36 values ('FII_ROLLING_WEEK' ,'YEARLY', -63, -6 , 9, sysdate, l_user, sysdate, l_user, l_user);
37 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
38 values ('FII_ROLLING_WEEK' ,'YEARLY', -70, -6 , 10, sysdate, l_user, sysdate, l_user, l_user);
39 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
40 values ('FII_ROLLING_WEEK' ,'YEARLY', -77, -6 , 11, sysdate, l_user, sysdate, l_user, l_user);
41 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
42 values ('FII_ROLLING_WEEK' ,'YEARLY', -84, -6 , 12, sysdate, l_user, sysdate, l_user, l_user);
43 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
44 values ('FII_ROLLING_MONTH' ,'YEARLY', 0 , -29, 0, sysdate, l_user, sysdate, l_user, l_user);
45 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
46 values ('FII_ROLLING_MONTH' ,'YEARLY', -30 ,-29, 1 , sysdate, l_user, sysdate, l_user, l_user);
47 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
48 values ('FII_ROLLING_MONTH' ,'YEARLY', -60 ,-29, 2 , sysdate, l_user, sysdate, l_user, l_user);
49 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
50 values ('FII_ROLLING_MONTH' ,'YEARLY', -90 ,-29, 3 , sysdate, l_user, sysdate, l_user, l_user);
51 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
52 values ('FII_ROLLING_MONTH' ,'YEARLY', -120 ,-29, 4 , sysdate, l_user, sysdate, l_user, l_user);
53 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
54 values ('FII_ROLLING_MONTH' ,'YEARLY', -150 ,-29, 5 , sysdate, l_user, sysdate, l_user, l_user);
55 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
56 values ('FII_ROLLING_MONTH' ,'YEARLY', -180 ,-29, 6 , sysdate, l_user, sysdate, l_user, l_user);
57 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
58 values ('FII_ROLLING_MONTH' ,'YEARLY', -210 ,-29, 7 , sysdate, l_user, sysdate, l_user, l_user);
59 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
60 values ('FII_ROLLING_MONTH' ,'YEARLY', -240 ,-29, 8 , sysdate, l_user, sysdate, l_user, l_user);
61 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
62 values ('FII_ROLLING_MONTH' ,'YEARLY', -270 ,-29, 9 , sysdate, l_user, sysdate, l_user, l_user);
63 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
64 values ('FII_ROLLING_MONTH' ,'YEARLY', -300 ,-29, 10 , sysdate, l_user, sysdate, l_user, l_user);
65 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
66 values ('FII_ROLLING_MONTH' ,'YEARLY', -330 ,-29, 11 , sysdate, l_user, sysdate, l_user, l_user);
67 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
68 values ('FII_ROLLING_QTR' ,'YEARLY', 0 ,-89, 0 , sysdate, l_user, sysdate, l_user, l_user);
69 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
70 values ('FII_ROLLING_QTR' ,'YEARLY', -90 ,-89, 1 , sysdate, l_user, sysdate, l_user, l_user);
71 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
72 values ('FII_ROLLING_QTR' ,'YEARLY', -180 ,-89, 2 , sysdate, l_user, sysdate, l_user, l_user);
73 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
74 values ('FII_ROLLING_QTR' ,'YEARLY', -270 ,-89, 3 , sysdate, l_user, sysdate, l_user, l_user);
75 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
76 values ('FII_ROLLING_YEAR' ,'YEARLY', 0 ,-364, 0 , sysdate, l_user, sysdate, l_user, l_user);
77 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
78 values ('FII_ROLLING_YEAR' ,'YEARLY', -365 ,-364, 1 , sysdate, l_user, sysdate, l_user, l_user);
79 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
80 values ('FII_ROLLING_YEAR' ,'YEARLY', -730 ,-364, 2 , sysdate, l_user, sysdate, l_user, l_user);
81 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
82 values ('FII_ROLLING_YEAR' ,'YEARLY', -1095 ,-364,3 , sysdate, l_user, sysdate, l_user, l_user);
83 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
84 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', 0, -6 , 0 , sysdate, l_user, sysdate, l_user, l_user);
85 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
86 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -7, -6 , 1 , sysdate, l_user, sysdate, l_user, l_user);
87 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
88 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -14, -6 , 2 , sysdate, l_user, sysdate, l_user, l_user);
89 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
90 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -21 , -6 , 3 , sysdate, l_user, sysdate, l_user, l_user);
91 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
92 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -28 , -6 , 4 , sysdate, l_user, sysdate, l_user, l_user);
93 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
94 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -35 , -6 , 5 , sysdate, l_user, sysdate, l_user, l_user);
95 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
96 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -42 , -6 , 6 , sysdate, l_user, sysdate, l_user, l_user);
97 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
98 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -49 , -6 , 7 , sysdate, l_user, sysdate, l_user, l_user);
99 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
100 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -56 , -6 , 8 , sysdate, l_user, sysdate, l_user, l_user);
101 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
102 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -63 , -6 , 9 , sysdate, l_user, sysdate, l_user, l_user);
103 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
104 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -70 , -6 , 10 , sysdate, l_user, sysdate, l_user, l_user);
105 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
106 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -77 , -6 , 11 , sysdate, l_user, sysdate, l_user, l_user);
107 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
108 values ('FII_ROLLING_WEEK' ,'SEQUENTIAL', -84 , -6 , 12 , sysdate, l_user, sysdate, l_user, l_user);
109 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
110 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', 0 ,-29, 0, sysdate, l_user, sysdate, l_user, l_user);
111 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
112 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -30 ,-29, 1, sysdate, l_user, sysdate, l_user, l_user);
113 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
114 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -60 ,-29, 2 , sysdate, l_user, sysdate, l_user, l_user);
115 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
116 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -90 ,-29, 3 , sysdate, l_user, sysdate, l_user, l_user);
117 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
118 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -120 ,-29, 4 , sysdate, l_user, sysdate, l_user, l_user);
119 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
120 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -150 ,-29, 5 , sysdate, l_user, sysdate, l_user, l_user);
121 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
122 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -180 ,-29, 6 , sysdate, l_user, sysdate, l_user, l_user);
123 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
124 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -210 ,-29, 7 , sysdate, l_user, sysdate, l_user, l_user);
125 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
126 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -240 ,-29, 8 , sysdate, l_user, sysdate, l_user, l_user);
127 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
128 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -270 ,-29, 9 , sysdate, l_user, sysdate, l_user, l_user);
129 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
130 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -300 ,-29, 10 , sysdate, l_user, sysdate, l_user, l_user);
131 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
132 values ('FII_ROLLING_MONTH' ,'SEQUENTIAL', -330 ,-29, 11 , sysdate, l_user, sysdate, l_user, l_user);
133 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
134 values ('FII_ROLLING_QTR' ,'SEQUENTIAL', 0 ,-89, 0 , sysdate, l_user, sysdate, l_user, l_user);
135 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
136 values ('FII_ROLLING_QTR' ,'SEQUENTIAL', -90 ,-89, 1 , sysdate, l_user, sysdate, l_user, l_user);
137 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
138 values ('FII_ROLLING_QTR' ,'SEQUENTIAL', -180 ,-89, 2 , sysdate, l_user, sysdate, l_user, l_user);
139 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
140 values ('FII_ROLLING_QTR' ,'SEQUENTIAL', -270 ,-89, 3 , sysdate, l_user, sysdate, l_user, l_user);
141 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
142 values ('FII_ROLLING_QTR' ,'SEQUENTIAL', -360 ,-89, 4 , sysdate, l_user, sysdate, l_user, l_user);
143 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
144 values ('FII_ROLLING_QTR' ,'SEQUENTIAL', -450 ,-89, 5 , sysdate, l_user, sysdate, l_user, l_user);
145 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
146 values ('FII_ROLLING_QTR' ,'SEQUENTIAL', -540 ,-89,6 , sysdate, l_user, sysdate, l_user, l_user);
147 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
148 values ('FII_ROLLING_QTR' ,'SEQUENTIAL', -630 ,-89,7 , sysdate, l_user, sysdate, l_user, l_user);
149 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
150 values ('FII_ROLLING_YEAR' ,'SEQUENTIAL', 0 ,-364,0 , sysdate, l_user, sysdate, l_user, l_user);
151 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
152 values ('FII_ROLLING_YEAR' ,'SEQUENTIAL', -365 ,-364,1 , sysdate, l_user, sysdate, l_user, l_user);
153 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
154 values ('FII_ROLLING_YEAR' ,'SEQUENTIAL', -730 ,-364,2 , sysdate, l_user, sysdate, l_user, l_user);
155 insert into fii_time_rolling_offsets(period_type, comparison_type, offset, start_date_offset, period_number, creation_date, created_by, last_update_date, last_updated_by, last_update_login)
156 values ('FII_ROLLING_YEAR' ,'SEQUENTIAL', -1095 ,-364,3 , sysdate, l_user, sysdate, l_user, l_user);
157
158 COMMIT;
159
160 o_error_code := 0;
161 o_error_msg := '';
162
163 if g_debug_flag = 'Y' then
164 fii_util.put_line('Successfully loaded the Rolling period offsets.');
165 end if;
166
167 exception
168
169 when others then
170
171 o_error_code := sqlcode;
172 o_error_msg := sqlerrm;
173 if g_debug_flag = 'Y' then
174 fii_util.put_line('Error loading the Rolling period offsets.');
175 end if;
176 RAISE_APPLICATION_ERROR(-20000,o_error_msg);
177
178 END Load_Rolling_Offsets;
179
180 END FII_TIME_ROLLING_PKG;