DBA Data[Home] [Help]

PACKAGE: APPS.GL_CALENDAR_PKG

Source


1 PACKAGE GL_CALENDAR_PKG as
2 /* $Header: glustcls.pls 120.1 2005/05/05 01:44:05 kvora noship $ */
3 
4 --
5 -- Package
6 --   GL_CALENDAR_PKG
7 -- Purpose
8 --   Various utilities for working with GL calendars.  These
9 --   utilities are available for use by other teams within
10 --   Oracle Applications.  They are not available for customization
11 --   purposes.
12 -- History
13 --   23-DEC-2004  D J Ogg          Created.
14 --
15 
16   -- Valid values for return_code
17   success      CONSTANT VARCHAR2(30) := 'SUCCESS';
18   bad_start    CONSTANT VARCHAR2(30) := 'BAD_START';
19   bad_end      CONSTANT VARCHAR2(30) := 'BAD_END';
20   unmapped_day CONSTANT VARCHAR2(30) := 'UNMAPPED_DAY';
21 
22   --
23   -- Procedure
24   --   Get_Num_Periods_In_Date_Range
25   -- Purpose
26   --   Takes a calendar, period type, start date, and end date.
27   --   Determines the number of non-adjustment periods in the
28   --   given calendar with the given period type that contain
29   --   dates within the given range.  Returns the resulting value
30   --   in num_periods and the status in return_code.
31   --
32   --   If the check_missing parameter is true,
33   --   this routine will check all of the dates within the
34   --   range to determine if they are associated with a
35   --   nonadjustment period.  If any are not associated with a
36   --   nonadjustment period, a return_code of UNMAPPED_DAY will be
37   --   returned and the unmapped day will be returned in
38   --   unmapped_date.
39   --
40   --   Possible values for return_code:
41   --     SUCCESS      - routine was successfully executed.
42   --     BAD_START    - the start date is not associated with any
43   --                    nonadjustment period
44   --     BAD_END      - the end date is not associated with any
45   --                    nonadjustment period
46   --     UNMAPPED_DAY - there is one or more dates within the date
47   --                    range that is not associated with any
48   --                    adjustment period.
49   -- History
50   --   23-DEC-2004  D. J. Ogg    Created
51   -- Arguments
52   --   calendar_name	Calendar to check
53   --   period_type	Type of period within the calendar to check
54   --   start_date	First date in the range
55   --   end_date         Last date in the range
56   --   check_missing    Indicates whether or not to check that all
57   --                    dates within the range are associated with a
58   --                    nonadjustment period.
59   --   num_periods      Number of periods that contain dates in the range
60   --   return_code      Return status
61   --   unmapped_date    In the case of a return_code of BAD_START,
62   --                    BAD_END, or UNMAPPED_DAY, contains the day or
63   --                    one of the days that are unmapped.
64   -- Example
65   --   gl_calendar_pkg.get_num_periods_in_date_range(
66   --      'Accounting'
67   --      'Month',
68   --      '15-Jan-2004',
69   --      '31-Mar-2004',
70   --      TRUE,
71   --      number_of_periods,
72   --      return_code,
73   --      bad_day);
74   -- Notes
75   --
76   PROCEDURE get_num_periods_in_date_range(
77                          calendar_name 			VARCHAR2,
78                          period_type 			VARCHAR2,
79                          start_date			DATE,
80                          end_date			DATE,
81 			 check_missing			BOOLEAN,
82 			 num_periods	   OUT NOCOPY   NUMBER,
83 			 return_code       OUT NOCOPY   VARCHAR2,
84 			 unmapped_date     OUT NOCOPY   DATE);
85 
86 END GL_CALENDAR_PKG;