1 PACKAGE FII_TIME_API AUTHID CURRENT_USER AS
2 /* $Header: FIICAT1S.pls 115.8 2003/06/13 23:32:30 pslau noship $ */
3
4 -- -------------------------------------------------------------------
5 -- Name: global_start_date
6 -- Desc: Returns the global start date of the
7 -- enterprise calendar. Info is cached after initial access
8 -- Output: Global Start Date of the enterprise year.
9 -- Error: If any sql errors occurs, an exception is raised.
10 -- --------------------------------------------------------------------
11 Function global_start_date return DATE;
12
13 -- -------------------------------------------------------------------
14 -- Name: global_end_date
15 -- Desc: Returns the global end date of the
16 -- enterprise calendar. Info is cached after initial access
17 -- Output: Global End Date of the enterprise year.
18 -- Error: If any sql errors occurs, an exception is raised.
19 -- --------------------------------------------------------------------
20 Function global_end_date return DATE;
21
22 -- -------------------------------------------------------------------
23 -- Name: ent_sd_lyr_beg
24 -- Desc: Returns the same day last year, count from year start date in the
25 -- enterprise calendar. Info is cached after initial access
26 -- Output: Same date(as the pass in date) in previous enterprise year.
27 -- Error: If any sql errors occurs, an exception is raised.
28 -- --------------------------------------------------------------------
29 Function ent_sd_lyr_beg(as_of_date date) return DATE;
30
31 -- -------------------------------------------------------------------
32 -- Name: ent_sd_lyr_end
33 -- Desc: Returns the same day last year, count from year end date in the
34 -- enterprise calendar. Info is cached after initial access
35 -- Output: Same date(as the pass in date) in previous enterprise year.
36 -- Error: If any sql errors occurs, an exception is raised.
37 -- --------------------------------------------------------------------
38 Function ent_sd_lyr_end(as_of_date date) return DATE;
39
40 -- -------------------------------------------------------------------
41 -- Name: ent_sd_lysqtr_beg
42 -- Desc: Returns the same day last year same quarter, count from quarter start
43 -- date in the enterprise calendar. Info is cached after initial access
44 -- Output: Same date(as the pass in date) same quarter in previous enterprise year.
45 -- Error: If any sql errors occurs, an exception is raised.
46 -- --------------------------------------------------------------------
47 Function ent_sd_lysqtr_beg(as_of_date date) return DATE;
48
49 -- -------------------------------------------------------------------
50 -- Name: ent_sd_lysqtr_end
51 -- Desc: Returns the same day last year same quarter, count from quarter end
52 -- date in the enterprise calendar. Info is cached after initial access
53 -- Output: Same date(as the pass in date) same quarter in previous enterprise year.
54 -- Error: If any sql errors occurs, an exception is raised.
55 -- --------------------------------------------------------------------
56 Function ent_sd_lysqtr_end(as_of_date date) return DATE;
57
58 -- -------------------------------------------------------------------
59 -- Name: ent_sd_pqtr_beg
60 -- Desc: Returns the same day prior quarter, count from quarter start
61 -- date in the enterprise calendar. Info is cached after initial access
62 -- Output: Same date(as the pass in date) in prior enterprise quarter.
63 -- Error: If any sql errors occurs, an exception is raised.
64 -- --------------------------------------------------------------------
65 Function ent_sd_pqtr_beg(as_of_date date) return DATE;
66
67 -- -------------------------------------------------------------------
68 -- Name: ent_sd_pqtr_end
69 -- Desc: Returns the same day prior quarter, count from quarter end date
70 -- in the enterprise calendar. Info is cached after initial access
71 -- Output: Same date(as the pass in date) in prior enterprise quarter.
72 -- Error: If any sql errors occurs, an exception is raised.
73 -- --------------------------------------------------------------------
74 Function ent_sd_pqtr_end(as_of_date date) return DATE;
75
76 -- -------------------------------------------------------------------
77 -- Name: ent_sd_lysper_beg
78 -- Desc: Returns the same day last year same period, count from period start
79 -- date in the enterprise calendar. Info is cached after initial access
80 -- Output: Same date(as the pass in date) same period in previous enterprise year.
81 -- Error: If any sql errors occurs, an exception is raised.
82 -- --------------------------------------------------------------------
83 Function ent_sd_lysper_beg(as_of_date date) return DATE;
84
85 -- -------------------------------------------------------------------
86 -- Name: ent_sd_lysper_end
87 -- Desc: Returns the same day last year same period, count from period end
88 -- date in the enterprise calendar. Info is cached after initial access
89 -- Output: Same date(as the pass in date) same period in previous enterprise year.
90 -- Error: If any sql errors occurs, an exception is raised.
91 -- --------------------------------------------------------------------
92 Function ent_sd_lysper_end(as_of_date date) return DATE;
93
94 -- -------------------------------------------------------------------
95 -- Name: ent_sd_pper_beg
96 -- Desc: Returns the same day prior period, count from period start
97 -- date in the enterprise calendar. Info is cached after initial access
98 -- Output: Same date(as the pass in date) in prior enterprise period.
99 -- Error: If any sql errors occurs, an exception is raised.
100 -- --------------------------------------------------------------------
101 Function ent_sd_pper_beg(as_of_date date) return DATE;
102
103 -- -------------------------------------------------------------------
104 -- Name: ent_sd_pper_end
105 -- Desc: Returns the same day prior period, count from period end date
106 -- in the enterprise calendar. Info is cached after initial access
107 -- Output: Same date(as the pass in date) in prior enterprise period.
108 -- Error: If any sql errors occurs, an exception is raised.
109 -- --------------------------------------------------------------------
110 Function ent_sd_pper_end(as_of_date date) return DATE;
111
112 -- -------------------------------------------------------------------
113 -- Name: sd_lyswk
114 -- Desc: Returns the same day last year same week in the enterprise calendar.
115 -- Info is cached after initial access
116 -- Output: Same date(as the pass in date) same week in previous enterprise year.
117 -- Error: If any sql errors occurs, an exception is raised.
118 -- --------------------------------------------------------------------
119 Function sd_lyswk(as_of_date date) return DATE;
120
121 -- -------------------------------------------------------------------
122 -- Name: sd_pwk
123 -- Desc: Returns the same day prior week in the enterprise calendar.
124 -- Info is cached after initial access
125 -- Output: Same date(as the pass in date) in prior week.
126 -- Error: If any sql errors occurs, an exception is raised.
127 -- --------------------------------------------------------------------
128 Function sd_pwk(as_of_date date) return DATE;
129
130 -- -------------------------------------------------------------------
131 -- Name: ent_cyr_start
132 -- Desc: Returns current enterprise year start date.
133 -- Info is cached after initial access
134 -- Output: Current Enterprise year start date
135 -- Error: If any sql errors occurs, an exception is raised.
136 -- --------------------------------------------------------------------
137 Function ent_cyr_start(as_of_date date) return DATE;
138
139 -- -------------------------------------------------------------------
140 -- Name: ent_cyr_end
141 -- Desc: Returns current enterprise year end date.
142 -- Info is cached after initial access
143 -- Output: Current Enterprise year end date
144 -- Error: If any sql errors occurs, an exception is raised.
145 -- --------------------------------------------------------------------
146 Function ent_cyr_end(as_of_date date) return DATE;
147
148 -- -------------------------------------------------------------------
149 -- Name: ent_pyr_start
150 -- Desc: Returns previous enterprise year start date.
151 -- Info is cached after initial access
152 -- Output: Previous Enterprise year start date
153 -- Error: If any sql errors occurs, an exception is raised.
154 -- --------------------------------------------------------------------
155 Function ent_pyr_start(as_of_date date) return DATE;
156
157 -- -------------------------------------------------------------------
158 -- Name: ent_pyr_end
159 -- Desc: Returns previous enterprise year end date.
160 -- Info is cached after initial access
161 -- Output: Previous Enterprise year end date
162 -- Error: If any sql errors occurs, an exception is raised.
163 -- --------------------------------------------------------------------
164 Function ent_pyr_end(as_of_date date) return DATE;
165
166 -- -------------------------------------------------------------------
167 -- Name: ent_cqtr_start
168 -- Desc: Returns current enterprise quarter start date.
169 -- Info is cached after initial access
170 -- Output: Current Enterprise quarter start date
171 -- Error: If any sql errors occurs, an exception is raised.
172 -- --------------------------------------------------------------------
173 Function ent_cqtr_start(as_of_date date) return DATE;
174
175 -- -------------------------------------------------------------------
176 -- Name: ent_cqtr_end
177 -- Desc: Returns current enterprise quarter end date.
178 -- Info is cached after initial access
179 -- Output: Current Enterprise quarter end date
180 -- Error: If any sql errors occurs, an exception is raised.
181 -- --------------------------------------------------------------------
182 Function ent_cqtr_end(as_of_date date) return DATE;
183
184 -- -------------------------------------------------------------------
185 -- Name: ent_lysqtr_start
186 -- Desc: Returns start date of same enterprise quarter in previous year.
187 -- Info is cached after initial access
188 -- Output: Last year same Enterprise quarter start date
189 -- Error: If any sql errors occurs, an exception is raised.
190 -- --------------------------------------------------------------------
191 Function ent_lysqtr_start(as_of_date date) return DATE;
192
193 -- -------------------------------------------------------------------
194 -- Name: ent_lysqtr_end
195 -- Desc: Returns end date of same enterprise quarter in previous year.
196 -- Info is cached after initial access
197 -- Output: Last year same Enterprise quarter end date
198 -- Error: If any sql errors occurs, an exception is raised.
199 -- --------------------------------------------------------------------
200 Function ent_lysqtr_end(as_of_date date) return DATE;
201
202 -- -------------------------------------------------------------------
203 -- Name: ent_pqtr_start
204 -- Desc: Returns previous enterprise quarter start date.
205 -- Info is cached after initial access
206 -- Output: Previous enterprise quarter start date
207 -- Error: If any sql errors occurs, an exception is raised.
208 -- --------------------------------------------------------------------
209 Function ent_pqtr_start(as_of_date date) return DATE;
210
211 -- -------------------------------------------------------------------
212 -- Name: ent_pqtr_end
213 -- Desc: Returns previous enterprise quarter end date.
214 -- Info is cached after initial access
215 -- Output: Previous enterprise quarter end date
216 -- Error: If any sql errors occurs, an exception is raised.
217 -- --------------------------------------------------------------------
218 Function ent_pqtr_end(as_of_date date) return DATE;
219
220 -- -------------------------------------------------------------------
221 -- Name: ent_cper_start
222 -- Desc: Returns current enterprise period start date.
223 -- Info is cached after initial access
224 -- Output: Current Enterprise period start date
225 -- Error: If any sql errors occurs, an exception is raised.
226 -- --------------------------------------------------------------------
227 Function ent_cper_start(as_of_date date) return DATE;
228
229 -- -------------------------------------------------------------------
230 -- Name: ent_cper_end
231 -- Desc: Returns current enterprise period end date.
232 -- Info is cached after initial access
233 -- Output: Current Enterprise period end date
234 -- Error: If any sql errors occurs, an exception is raised.
235 -- --------------------------------------------------------------------
236 Function ent_cper_end(as_of_date date) return DATE;
237
238 -- -------------------------------------------------------------------
239 -- Name: ent_lysper_start
240 -- Desc: Returns start date of same enterprise period in previous year.
241 -- Info is cached after initial access
242 -- Output: Last year same Enterprise period start date
243 -- Error: If any sql errors occurs, an exception is raised.
244 -- --------------------------------------------------------------------
245 Function ent_lysper_start(as_of_date date) return DATE;
246
247 -- -------------------------------------------------------------------
248 -- Name: ent_lysper_end
249 -- Desc: Returns end date of same enterprise period in previous year.
250 -- Info is cached after initial access
251 -- Output: Last year same Enterprise period end date
252 -- Error: If any sql errors occurs, an exception is raised.
253 -- --------------------------------------------------------------------
254 Function ent_lysper_end(as_of_date date) return DATE;
255
256 -- -------------------------------------------------------------------
257 -- Name: ent_pper_start
258 -- Desc: Returns previous enterprise period start date.
259 -- Info is cached after initial access
260 -- Output: Previous enterprise period start date
261 -- Error: If any sql errors occurs, an exception is raised.
262 -- --------------------------------------------------------------------
263 Function ent_pper_start(as_of_date date) return DATE;
264
265 -- -------------------------------------------------------------------
266 -- Name: ent_pper_end
267 -- Desc: Returns previous enterprise period end date.
268 -- Info is cached after initial access
269 -- Output: Previous enterprise period end date
270 -- Error: If any sql errors occurs, an exception is raised.
271 -- --------------------------------------------------------------------
272 Function ent_pper_end(as_of_date date) return DATE;
273
274 -- -------------------------------------------------------------------
275 -- Name: cwk_start
276 -- Desc: Returns current week start date.
277 -- Info is cached after initial access
278 -- Output: Current Week start date
279 -- Error: If any sql errors occurs, an exception is raised.
280 -- --------------------------------------------------------------------
281 Function cwk_start(as_of_date date) return DATE;
282
283 -- -------------------------------------------------------------------
284 -- Name: cwk_end
285 -- Desc: Returns current week end date.
286 -- Info is cached after initial access
287 -- Output: Current Week end date
288 -- Error: If any sql errors occurs, an exception is raised.
289 -- --------------------------------------------------------------------
290 Function cwk_end(as_of_date date) return DATE;
291
292 -- -------------------------------------------------------------------
293 -- Name: lyswk_start
294 -- Desc: Returns start date of same week in previous year.
295 -- Info is cached after initial access
296 -- Output: Last year same week start date
297 -- Error: If any sql errors occurs, an exception is raised.
298 -- --------------------------------------------------------------------
299 Function lyswk_start(as_of_date date) return DATE;
300
301 -- -------------------------------------------------------------------
302 -- Name: lyswk_end
303 -- Desc: Returns end date of same week in previous year.
304 -- Info is cached after initial access
305 -- Output: Last year same week end date
306 -- Error: If any sql errors occurs, an exception is raised.
307 -- --------------------------------------------------------------------
308 Function lyswk_end(as_of_date date) return DATE;
309
310 -- -------------------------------------------------------------------
311 -- Name: pwk_start
312 -- Desc: Returns previous week start date.
313 -- Info is cached after initial access
314 -- Output: Previous Week start date
315 -- Error: If any sql errors occurs, an exception is raised.
316 -- --------------------------------------------------------------------
317 Function pwk_start(as_of_date date) return DATE;
318
319 -- -------------------------------------------------------------------
320 -- Name: pwk_end
321 -- Desc: Returns previous week end date.
322 -- Info is cached after initial access
323 -- Output: Previous Week end date
324 -- Error: If any sql errors occurs, an exception is raised.
325 -- --------------------------------------------------------------------
326 Function pwk_end(as_of_date date) return DATE;
327
328 -- -------------------------------------------------------------------
329 -- Name: rmth_start
330 -- Desc: Returns rolling month start date.
331 -- Info is cached after initial access
332 -- Output: Rolling Month start date
333 -- Error: If any sql errors occurs, an exception is raised.
334 -- --------------------------------------------------------------------
335 Function rmth_start(as_of_date date) return DATE;
336
337 -- -------------------------------------------------------------------
338 -- Name: rqtr_start
339 -- Desc: Returns rolling quarter start date.
340 -- Info is cached after initial access
341 -- Output: Rolling Quarter start date
342 -- Error: If any sql errors occurs, an exception is raised.
343 -- --------------------------------------------------------------------
344 Function rqtr_start(as_of_date date) return DATE;
345
346 -- -------------------------------------------------------------------
347 -- Name: ryr_start
348 -- Desc: Returns rolling year start date.
349 -- Info is cached after initial access
350 -- Output: Rolling Year start date
351 -- Error: If any sql errors occurs, an exception is raised.
352 -- --------------------------------------------------------------------
353 Function ryr_start(as_of_date date) return DATE;
354
355 -- -------------------------------------------------------------------
356 -- Name: rwk_start
357 -- Desc: Returns rolling week start date.
358 -- Info is cached after initial access
359 -- Output: Rolling Week start date
360 -- Error: If any sql errors occurs, an exception is raised.
361 -- --------------------------------------------------------------------
362 Function rwk_start(as_of_date date) return DATE;
363
364 -- -------------------------------------------------------------------
365 -- Name: day_left_in_qtr
366 -- Desc: Returns number of days left in a quarter in a specific format.
367 -- Info is cached after initial access
368 -- Output: Number of days left in a quarter. e.g. given 08-Apr-2002, it returns
369 -- Q4 FY02 Day: -54
370 -- Error: If any sql errors occurs, an exception is raised.
371 -- --------------------------------------------------------------------
372 Function day_left_in_qtr(as_of_date date) return varchar2;
373
374 -- -------------------------------------------------------------------
375 -- Name: ent_lysper_id
376 -- Desc: Returns ID of same enterprise period in previous year.
377 -- Info is cached after initial access
378 -- Output: Last year same Enterprise period id
379 -- Error: If any sql errors occurs, an exception is raised.
380 -- --------------------------------------------------------------------
381 Function ent_lysper_id(id number) return NUMBER;
382
383 PRAGMA RESTRICT_REFERENCES (global_start_date, WNDS);
384 PRAGMA RESTRICT_REFERENCES (global_end_date, WNDS);
385 PRAGMA RESTRICT_REFERENCES (ent_sd_lyr_beg, WNDS);
386 PRAGMA RESTRICT_REFERENCES (ent_sd_lyr_end, WNDS);
387 PRAGMA RESTRICT_REFERENCES (ent_sd_lysqtr_beg, WNDS);
388 PRAGMA RESTRICT_REFERENCES (ent_sd_lysqtr_end, WNDS);
389 PRAGMA RESTRICT_REFERENCES (ent_sd_pqtr_beg, WNDS);
390 PRAGMA RESTRICT_REFERENCES (ent_sd_pqtr_end, WNDS);
391 PRAGMA RESTRICT_REFERENCES (ent_sd_lysper_beg, WNDS);
392 PRAGMA RESTRICT_REFERENCES (ent_sd_lysper_end, WNDS);
393 PRAGMA RESTRICT_REFERENCES (ent_sd_pper_beg, WNDS);
394 PRAGMA RESTRICT_REFERENCES (ent_sd_pper_end, WNDS);
395 PRAGMA RESTRICT_REFERENCES (sd_lyswk, WNDS);
396 PRAGMA RESTRICT_REFERENCES (sd_pwk, WNDS);
397 PRAGMA RESTRICT_REFERENCES (ent_cyr_start, WNDS);
398 PRAGMA RESTRICT_REFERENCES (ent_cyr_end, WNDS);
399 PRAGMA RESTRICT_REFERENCES (ent_pyr_start, WNDS);
400 PRAGMA RESTRICT_REFERENCES (ent_pyr_end, WNDS);
401 PRAGMA RESTRICT_REFERENCES (ent_cqtr_start, WNDS);
402 PRAGMA RESTRICT_REFERENCES (ent_cqtr_end, WNDS);
403 PRAGMA RESTRICT_REFERENCES (ent_lysqtr_start, WNDS);
404 PRAGMA RESTRICT_REFERENCES (ent_lysqtr_end, WNDS);
405 PRAGMA RESTRICT_REFERENCES (ent_pqtr_start, WNDS);
406 PRAGMA RESTRICT_REFERENCES (ent_pqtr_end, WNDS);
407 PRAGMA RESTRICT_REFERENCES (ent_cper_start, WNDS);
408 PRAGMA RESTRICT_REFERENCES (ent_cper_end, WNDS);
409 PRAGMA RESTRICT_REFERENCES (ent_lysper_start, WNDS);
410 PRAGMA RESTRICT_REFERENCES (ent_lysper_end, WNDS);
411 PRAGMA RESTRICT_REFERENCES (ent_pper_start, WNDS);
412 PRAGMA RESTRICT_REFERENCES (ent_pper_end, WNDS);
413 PRAGMA RESTRICT_REFERENCES (cwk_start, WNDS);
414 PRAGMA RESTRICT_REFERENCES (cwk_end, WNDS);
415 PRAGMA RESTRICT_REFERENCES (lyswk_start, WNDS);
416 PRAGMA RESTRICT_REFERENCES (lyswk_end, WNDS);
417 PRAGMA RESTRICT_REFERENCES (pwk_start, WNDS);
418 PRAGMA RESTRICT_REFERENCES (pwk_end, WNDS);
419 PRAGMA RESTRICT_REFERENCES (rmth_start, WNDS);
420 PRAGMA RESTRICT_REFERENCES (rqtr_start, WNDS);
421 PRAGMA RESTRICT_REFERENCES (ryr_start, WNDS);
422 PRAGMA RESTRICT_REFERENCES (rwk_start, WNDS);
423 PRAGMA RESTRICT_REFERENCES (day_left_in_qtr, WNDS);
424 PRAGMA RESTRICT_REFERENCES (ent_lysper_id, WNDS);
425
426
427 -- -------------------------------------------------------------------
428 -- Name: check_missing_date
429 -- Desc: Check if there is any missing date in the time dimension
430 -- for the range (via two input parameters): (from_date, to_date).
431 -- It returns one boolean: has_missing_date
432 -- It also prints out message in the output file if there's gap;
433 -- in particular, the minimum and maximum of these missing dates.
434 -- This procedure requires the setup of files and directory
435 -- for fnd_file.
436 -- Output: true/false
437 -- Error: If any sql error occurs, will report it to the log file;
438 -- and an exception is raised.
439 -- --------------------------------------------------------------------
440 procedure check_missing_date (p_from_date IN date,
441 p_to_date IN date,
442 p_has_missing_date OUT NOCOPY boolean);
443
444
445 -- -------------------------------------------------------------------
446 -- Name: check_missing_date (overloaded version)
447 -- Desc: Check if there is any missing date in the time dimension
448 -- for the range (via two input parameters): (from_date, to_date).
449 -- It returns three output parameters: has_missing_date,
450 -- min_missing_date, max_missing_date.
451 -- No output will be generated.
452 -- Error: If any sql error occurs, will report it to the log file;
453 -- and an exception is raised.
454 -- --------------------------------------------------------------------
455 Procedure check_missing_date (p_from_date IN date,
456 p_to_date IN date,
457 p_has_missing_date OUT NOCOPY boolean,
458 p_min_missing_date OUT NOCOPY date,
459 p_max_missing_date OUT NOCOPY date);
460
461 -----------------------------------------------------------------------
462 ----- Following 5 APIs are from PJI team
463
464 -- -------------------------------------------------------------------
465 -- Name: cal_sd_lyr_end
466 -- Desc: Returns the same day last year, count from year end date in the
467 -- financial calendar. Info is cached after initial access
468 -- Output: Same date(as the pass in date) in previous financial year.
469 -- Error: If any sql errors occurs, an exception is raised.
470 -- --------------------------------------------------------------------
471 Function cal_sd_lyr_end(as_of_date date, p_calendar_id number) return DATE;
472
473 -- -------------------------------------------------------------------
474 -- Name: cal_sd_lysqtr_end
475 -- Desc: Returns the same day last year same quarter, count from quarter end
476 -- date in the financial calendar. Info is cached after initial access
477 -- Output: Same date(as the pass in date) same quarter in previous financial year.
478 -- Error: If any sql errors occurs, an exception is raised.
479 -- --------------------------------------------------------------------
480 Function cal_sd_lysqtr_end(as_of_date date, p_calendar_id number) return DATE;
481
482 -- -------------------------------------------------------------------
483 -- Name: cal_sd_lysper_end
484 -- Desc: Returns the same day last year same period, count from period end
485 -- date in the financial calendar. Info is cached after initial access
486 -- Output: Same date(as the pass in date) same period in previous financial year.
487 -- Error: If any sql errors occurs, an exception is raised.
488 -- --------------------------------------------------------------------
489 Function cal_sd_lysper_end(as_of_date date, p_calendar_id number) return DATE;
490
491 -- -------------------------------------------------------------------
492 -- Name: cal_sd_pqtr_end
493 -- Desc: Returns the same day prior quarter, count from quarter end date
494 -- in the financial calendar. Info is cached after initial access
495 -- Output: Same date(as the pass in date) in prior financial quarter.
496 -- Error: If any sql errors occurs, an exception is raised.
497 -- --------------------------------------------------------------------
498 Function cal_sd_pqtr_end(as_of_date date, p_calendar_id number) return DATE;
499
500 -- -------------------------------------------------------------------
501 -- Name: cal_sd_pper_end
502 -- Desc: Returns the same day prior period, count from period end date
503 -- in the financial calendar. Info is cached after initial access
504 -- Output: Same date(as the pass in date) in prior financial period.
505 -- Error: If any sql errors occurs, an exception is raised.
506 -- --------------------------------------------------------------------
507 Function cal_sd_pper_end(as_of_date date, p_calendar_id number) return DATE;
508
509 PRAGMA RESTRICT_REFERENCES (cal_sd_lyr_end, WNDS);
510 PRAGMA RESTRICT_REFERENCES (cal_sd_lysqtr_end, WNDS);
511 PRAGMA RESTRICT_REFERENCES (cal_sd_lysper_end, WNDS);
512 PRAGMA RESTRICT_REFERENCES (cal_sd_pqtr_end, WNDS);
513 PRAGMA RESTRICT_REFERENCES (cal_sd_pper_end, WNDS);
514
515 ------------------------------------------------------------------------
516
517 -- -------------------------------------------------------------------
518 -- Name: ent_rolling_start_date
519 -- Desc: Returns the start date of the first rolling period/quarter/year in
520 -- enterprise calendar. Info is cached after initial access
521 -- Output: Start date of the first rolling period/quarter/year in enteprise calendar.
522 -- Error: If any sql errors occurs, an exception is raised.
523 -- --------------------------------------------------------------------
524 Function ent_rolling_start_date(as_of_date date, period_type varchar2) return DATE;
525
526 -- -------------------------------------------------------------------
527 -- Name: next_period_end_date
528 -- Desc: Returns the end date of the next week/period/quarter/year.
529 -- Info is cached after initial access
530 -- Output: End date of the next week/period/quarter/year.
531 -- Error: If any sql errors occurs, an exception is raised.
532 -- --------------------------------------------------------------------
533 Function next_period_end_date(as_of_date date, period_type varchar2) return DATE;
534
535 end;