DBA Data[Home] [Help]

PACKAGE: APPS.GCS_HIERARCHIES_PKG

Source


1 PACKAGE GCS_HIERARCHIES_PKG AS
2 /* $Header: gcshiers.pls 120.3 2006/05/22 12:36:56 smatam noship $ */
3 --
4 -- Package
5 --   gcs_hierarchies_pkg
6 -- Purpose
7 --   Package procedures for Consolidation Hierarchies
8 -- History
9 --   28-JUN-04	M Ward		Created
10 --
11 
12   --
13   -- Procedure
14   --   Insert_Row
15   -- Purpose
16   --   Inserts a row into the gcs_lex_map_structs table.
17   -- Arguments
18   --   row_id
19   --   hierarchy_id
20   --   top_entity_id
21   --   start_date
22   --   calendar_id
23   --   dimension_group_id
24   --   ie_by_org_code
25   --   balance_by_org_flag
26   --   enabled_flag
27   --   threshold_amount
28   --   threshold_currency
29   --   fem_ledger_id
30   --   column_name
31   --   object_version_number
32   --   hierarchy_name
33   --   description
34   --   last_update_date
35   --   last_updated_by
36   --   last_update_login
37   --   creation_date
38   --   created_by
39   -- Example
40   --   GCS_HIERARCHIES_PKG.Insert_Row(...);
41   -- Notes
42   --
43   PROCEDURE Insert_Row(	row_id	IN OUT NOCOPY		VARCHAR2,
44 			hierarchy_id			VARCHAR2,
45 			top_entity_id			NUMBER,
46 			start_date			VARCHAR2,
47 			calendar_id			NUMBER,
48 			dimension_group_id		NUMBER,
49 			ie_by_org_code			VARCHAR2,
50 			balance_by_org_flag		VARCHAR2,
51 			enabled_flag			VARCHAR2,
52 			threshold_amount		NUMBER,
53 			threshold_currency		VARCHAR2,
54 			fem_ledger_id			NUMBER,
55 			column_name			VARCHAR2,
56 			object_version_number		NUMBER,
57 			hierarchy_name			VARCHAR2,
58 			description			VARCHAR2,
59 			last_update_date		DATE,
60 			last_updated_by			NUMBER,
61 			last_update_login		NUMBER,
62 			creation_date			DATE,
63 			created_by			NUMBER);
64 
65   --
66   -- Procedure
67   --   Update_Row
68   -- Purpose
69   --   Updates a row in the gcs_lex_map_structs table.
70   -- Arguments
71   --   hierarchy_id
72   --   top_entity_id
73   --   start_date
74   --   calendar_id
75   --   dimension_group_id
76   --   ie_by_org_code
77   --   balance_by_org_flag
78   --   enabled_flag
79   --   threshold_amount
80   --   threshold_currency
81   --   fem_ledger_id
82   --   column_name
83   --   object_version_number
84   --   hierarchy_name
85   --   description
86   --   last_update_date
87   --   last_udpated_by
88   --   last_update_login
89   -- Example
90   --   GCS_HIERARCHIES_PKG.Update_Row(...);
91   -- Notes
92   --
93   PROCEDURE Update_Row(	hierarchy_id			VARCHAR2,
94 			top_entity_id			NUMBER,
95 			start_date			VARCHAR2,
96 			calendar_id			NUMBER,
97 			dimension_group_id		NUMBER,
98 			ie_by_org_code			VARCHAR2,
99 			balance_by_org_flag		VARCHAR2,
100 			enabled_flag			VARCHAR2,
101 			threshold_amount		NUMBER,
102 			threshold_currency		VARCHAR2,
103 			fem_ledger_id			NUMBER,
104 			column_name			VARCHAR2,
105 			object_version_number		NUMBER,
106 			hierarchy_name			VARCHAR2,
107 			description			VARCHAR2,
108 			last_update_date		DATE,
109 			last_updated_by			NUMBER,
110 			last_update_login		NUMBER,
111 			creation_date			DATE,
112 			created_by			NUMBER);
113 
114   --
115   -- Procedure
116   --   Load_Row
117   -- Purpose
118   --   Loads a row into the gcs_lex_map_structs table.
119   -- Arguments
120   --   hierarchy_id
121   --   owner
122   --   last_update_date
123   --   custom_mode
124   --   top_entity_id
125   --   start_date
126   --   calendar_id
127   --   dimension_group_id
128   --   ie_by_org_code
129   --   balance_by_org_flag
130   --   enabled_flag
131   --   threshold_amount
132   --   threshold_currency
133   --   fem_ledger_id
134   --   column_name
135   --   object_version_number
136   --   hierarchy_name
137   --   description
138   -- Example
139   --   GCS_HIERARCHIES_PKG.Load_Row(...);
140   -- Notes
141   --
142   PROCEDURE Load_Row(	hierarchy_id			VARCHAR2,
143 			owner				VARCHAR2,
144 			last_update_date		VARCHAR2,
145 			custom_mode			VARCHAR2,
146 			top_entity_id			NUMBER,
147 			start_date			VARCHAR2,
148 			calendar_id			NUMBER,
149 			dimension_group_id		NUMBER,
150 			ie_by_org_code			VARCHAR2,
151 			balance_by_org_flag		VARCHAR2,
152 			enabled_flag			VARCHAR2,
153 			threshold_amount		NUMBER,
154 			threshold_currency		VARCHAR2,
155 			fem_ledger_id			NUMBER,
156 			column_name			VARCHAR2,
157 			object_version_number		NUMBER,
158 			hierarchy_name			VARCHAR2,
159 			description			VARCHAR2);
160 
161   --
162   -- Procedure
163   --   Translate_Row
164   -- Purpose
165   --   Updates translated infromation for a row in the
166   --   gcs_hierarchies_tl table.
167   -- Arguments
168   --   hierarchy_id
169   --   owner
170   --   last_update_date
171   --   custom_mode
172   --   hierarchy_name
173   --   description
174   -- Example
175   --   GCS_HIERARCHIES_PKG.Translate_Row(...);
176   -- Notes
177   --
178   PROCEDURE Translate_Row(	hierarchy_id		NUMBER,
179 				owner			VARCHAR2,
180 				last_update_date	VARCHAR2,
181 				custom_mode		VARCHAR2,
182 				hierarchy_name		VARCHAR2,
183 				description		VARCHAR2);
184 
185 
186 
187   --
188   -- Procedure
189   --   ADD_LANGUAGE
190   -- Purpose
191   --
192   -- Arguments
193   --
194   -- GCS_HIERARCHIES_PKG.ADD_LANGUAGE();
195   -- Notes
196   --
197   PROCEDURE ADD_LANGUAGE ;
198 
199   --
200   -- Procedure
201   --   Calculate_Delta
202   -- Purpose
203   --   Calculates the delta ownership amounts for an entity and its children,
204   --   and updates or creates the necessary gcs_cons_relationships row.
205   -- Arguments
206   --   p_hierarchy_id		Hierarchy for which the logic must be performed
207   --   p_child_entity_id	Entity for which the logic must be performed
208   --   p_effective_date		Start date for performing the logic
209   -- Example
210   --   GCS_HIERARCHIES_PKG.Calculate_Delta(...);
211   -- Notes
212   --
213   PROCEDURE Calculate_Delta(	p_hierarchy_id		NUMBER,
214 				p_child_entity_id	NUMBER,
215 				p_effective_date	DATE);
216 
217   --
218   -- Procedure
219   --   Reciprocal_Exists
220   -- Purpose
221   --   See whether or not a cycle exists in the hierarchy. Search recursively
222   --   for the child entity id, starting from the parent entity id, within the
223   --   dates specified.
224   -- Arguments
225   --   p_hierarchy_id		Hierarchy for which the logic must be performed
226   --   p_child_id		Entity we are searching for
227   --   p_parent_id		Entity to start the search from
228   --   p_start_date		Effective date range
229   --   p_end_date		Effective date range
230   -- Example
231   --   GCS_HIERARCHIES_PKG.Reciprocal_Exists(...);
232   -- Notes
233   --
234   FUNCTION Reciprocal_Exists(	p_hierarchy_id	NUMBER,
235 				p_child_id	NUMBER,
236 				p_parent_id	NUMBER,
237 				p_start_date	DATE,
238 				p_end_date	DATE) RETURN VARCHAR2;
239 
240   --
241   -- Procedure
242   --   Set_Dominance
243   -- Purpose
244   --   Set the dominant parent flag for a relationship after an add or update
245   --   entity in the update flow.
246   -- Arguments
247   --   p_rel_id               New relationship identifier
248   -- Example
249   --   GCS_HIERARCHIES_PKG.Set_Dominance(123, 'ADD');
250   -- Notes
251   --
252   PROCEDURE Set_Dominance(    p_rel_id        NUMBER);
253 
254   --
255   -- Procedure
256   --   Handle_Remove
257   -- Purpose
258   --   Handle removal of an entity in the update flow.
259   -- Arguments
260   --   p_hier_id               Hierarchy identifier
261   --   p_removal_date          Date of the removal
262   -- Example
263   --   GCS_HIERARCHIES_PKG.Set_Dominance(123, 'ADD');
264   -- Notes
265   --
266   PROCEDURE Handle_Remove(	p_hier_id	NUMBER,
267                                 p_removal_date	DATE);
268 
269   --
270   -- Procedure
271   --   Handle_Datatypes
272   -- Purpose
273   --   Creating FEM,GCS data sets, when a new hierarchy is created.
274   -- Arguments
275   --   p_hier_id               Hierarchy identifier
276   -- Example
277   --   GCS_HIERARCHIES_PKG.Handle_Datatypes(123 );
278   -- Notes
279   --
280   PROCEDURE Handle_Datatypes (	p_hierarchy_id	NUMBER );
281 
282    --
283   -- Procedure
284   --   Update_Hierarchies_Datatype
285  -- Purpose
286   --   Creating FEM,GCS data sets, when a new data type is created.
287   -- Arguments
288   --   p_data_type_code         Data Type Code identifier
289   -- Example
290   --   GCS_HIERARCHIES_PKG.Handle_Hierarchies('TEST' );
291   -- Notes
292   --
293   PROCEDURE Update_Hierarchies_Datatype(p_data_type_code VARCHAR2);
294 
295   --
296   -- Procedure
297   --   Handle_Datasets_Ledger
298   -- Purpose
299   --   Updates the Dataset name/desc and Ledger Name/Desc when Hierarchy Name is changed.
300   -- Arguments
301   --   p_hier_id               Hierarchy identifier
302   -- Example
303   --   GCS_HIERARCHIES_PKG.Handle_Datasets_Ledger(hierarchyId );
304   -- Notes
305   --
306   PROCEDURE Handle_Datasets_Ledger(p_hierarchy_id NUMBER);
307 
308 END GCS_HIERARCHIES_PKG;