DBA Data[Home] [Help]

PACKAGE: APPS.GL_ALLOC_HISTORY_PKG

Source


1 PACKAGE gl_alloc_history_pkg AS
2 /* $Header: glimahis.pls 120.5 2005/05/05 01:17:16 kvora ship $ */
3 --
4 -- Package
5 --   gl_alloc_history_pkg
6 -- Purpose
7 --   To contain validation and insertion routines for gl_alloc_history
8 -- History
9 --   12-31-93  	D. J. Ogg	Created
10 
11   --
12   -- PUBLIC CONSTANTS
13   --
14   DEFAULT_NUM_FORMULAS_TO_CHECK	CONSTANT NUMBER := 5;
15 
16 
17   --
18   -- Procedure
19   --   period_last_run
20   -- Purpose
21   --   Determines the period, calculation effective date, journal effective date
22   --   for which a particular MassAllocation batch was last run for a given set
23   --   of books.
24   -- History
25   --   04-20-96  R Goyal    Created
26   -- Arguments
27   --   batch_id		      ID of MassAllocation batch
28   --   access_set_id   		      ID of current access set
29   --   period_name            The period the MA batch was last run for
30   --   calculation_eff_date   The CED the MA batch was last run for
31   --   journal_eff_date       The JED the MA batch was last run for
32   -- Returns
33   --   The period, calculation and journal effective dates for which the
34   --   MassAllocation batch was last run
35   -- Notes
36   --
37   PROCEDURE period_last_run(batch_id NUMBER,
38 			    access_set_id NUMBER,
39                             period_name IN OUT NOCOPY VARCHAR2,
40                             calculation_eff_date IN OUT NOCOPY DATE,
41                             journal_eff_date IN OUT NOCOPY DATE);
42 
43   --
44   -- Function
45   --   set_random_ledger_id
46   -- Purpose
47   --   Randomly select a ledger from T or O line of the batch. If no ledger
48   --   is available, use the given ledger override id.
49   -- History
50   --   03-05-02   T Cheng   Created
51   -- Arguments
52   --   x_allocation_batch_id     batch id
53   --   x_line_selection          'ABC' or 'TO', to select line 1,2,3 or 4,5
54   --   x_ledger_override_id      ledger override id
55   -- Notes
56   --
57   FUNCTION set_random_ledger_id (x_allocation_batch_id NUMBER,
58                                  x_line_selection VARCHAR2,
59                                  x_ledger_override_id NUMBER) RETURN NUMBER;
60 
61   --
62   -- Procedure
63   --   validate_calc_effective_date
64   -- Purpose
65   --   Checks certain number of formulas, see if the given calculation
66   --   effective date falls in a never opened period for the ledgers
67   --   in these formulas.
68   -- History
69   --   03-13-02   T Cheng   Created
70   -- Arguments
71   --   x_allocation_batch_id   batch id
72   --   x_check_date            the date used to read ledger sets
73   --   x_selected_ced          the calculation effective date
74   -- Returns
75   --   TRUE if the calculation effective date does not fall in any of the
76   --   ledgers being checked. FALSE otherwise.
77   -- Notes
78   --
79   FUNCTION validate_calc_effective_date(x_allocation_batch_id NUMBER,
80                                         x_check_date DATE,
81                                         x_selected_ced DATE) RETURN BOOLEAN;
82 
83   --
84   -- Function
85   --   allow_average_usage
86   -- Purpose
87   --   Check for "certain number of formulas" in the batch whether the ledgers
88   --   (including ledgers within ledger sets) in T/O lines are all
89   --   consolidation ledgers. Only if so will average usage be allowed.
90   -- History
91   --   03-04-02   T Cheng   Created
92   -- Arguments
93   --   x_allocation_batch_id    batch id
94   --   x_period_end_date        period end date
95   --   x_ledger_override_id     ledger id of the ledger override
96   -- Notes
97   --
98   FUNCTION allow_average_usage(x_allocation_batch_id NUMBER,
99                                x_period_end_date DATE,
100                                x_ledger_override_id NUMBER) RETURN BOOLEAN;
101 
102 END gl_alloc_history_pkg;