DBA Data[Home] [Help]

PACKAGE: APPS.HZ_MO_GLOBAL_CACHE

Source


4 ----------------------------------------
1 PACKAGE HZ_MO_GLOBAL_CACHE AUTHID CURRENT_USER as
2 /*$Header: ARHMOGCS.pls 120.6 2006/04/17 22:54:24 dmmehta noship $ */
3 
5 -- declaration of tables.
6 ----------------------------------------
7 
8 TYPE OrgIDTable IS TABLE OF hr_organization_information.organization_id%TYPE;
9 TYPE AutoSiteNumberingTable IS TABLE OF
10 	ar_system_parameters_all.auto_site_numbering%TYPE;
11 TYPE DefaultCountryTable IS TABLE OF
12 	ar_system_parameters_all.default_country%TYPE;
13 TYPE SetOfBooksIDTable is TABLE OF gl_sets_of_books.set_of_books_id%TYPE;
14 TYPE ChartOfAccountsIDTable IS TABLE OF
15 	gl_sets_of_books.chart_of_accounts_id%TYPE;
16 TYPE LocationStructureIDTable is TABLE OF ar_system_parameters_all.location_structure_id%TYPE;
17 TYPE TaxMethodTable is TABLE OF ar_system_parameters_all.tax_method%TYPE;
18 TYPE AddressValTable is TABLE OF ar_system_parameters_all.address_validation%TYPE;
19 --  Bug 5002547 : Added for Reciprocal Flag field
20 TYPE ReciprocalFlagTable is TABLE OF
21 ar_system_parameters_all.create_reciprocal_flag%TYPE;
22 ----------------------------------------
23 -- declaration of global record types.
24 ----------------------------------------
25 
26 TYPE GlobalsRecord IS RECORD (
27 	Auto_site_numbering   AR_SYSTEM_PARAMETERS_ALL.AUTO_SITE_NUMBERING%TYPE,
28 	Default_country	      AR_SYSTEM_PARAMETERS_ALL.DEFAULT_COUNTRY%TYPE,
29 	Chart_of_accounts_ID  GL_SETS_OF_BOOKS.CHART_OF_ACCOUNTS_ID%TYPE,
30 	Set_of_books_ID	      GL_SETS_OF_BOOKS.SET_OF_BOOKS_ID%TYPE,
31 	Location_structure_ID AR_SYSTEM_PARAMETERS_ALL.LOCATION_STRUCTURE_ID%TYPE,
32 	Tax_method            AR_SYSTEM_PARAMETERS_ALL.TAX_METHOD%TYPE,
33 	Address_val           AR_SYSTEM_PARAMETERS_ALL.ADDRESS_VALIDATION%TYPE,
34         Reciprocal_flag       AR_SYSTEM_PARAMETERS_ALL.CREATE_RECIPROCAL_FLAG%TYPE
35 			     );
36 
37 TYPE GlobalsTable is RECORD  (
38 	org_id_t		OrgIDTable,
39 	auto_site_numbering_t	AutoSiteNumberingTable,
40 	default_country_t	DefaultCountryTable,
41 	chart_of_accounts_id_t	ChartOfAccountsIDTable,
42 	set_of_books_id_t	SetOfBooksIDTable,
43 	location_structure_id_t LocationStructureIDTable,
44 	tax_method_t            TaxMethodTable,
45 	address_val_t           AddressValTable,
46         reciprocal_flag_t       ReciprocalFlagTable
47 			     );
48 
49 TYPE cust_num_gen_rec IS RECORD (
50 	Default_Org AR_SYSTEM_PARAMETERS_ALL.ORG_ID%TYPE,
51 	Generate_customer_number
52 		AR_SYSTEM_PARAMETERS_ALL.generate_customer_number%TYPE,
53 --  Bug 5002547 : Added for Grouping Rule, Autocash Rule Set field
54         Default_grouping_rule_ID
55                 AR_SYSTEM_PARAMETERS_ALL.default_grouping_rule_id%TYPE,
56         Autocash_hierarchy_ID AR_SYSTEM_PARAMETERS_ALL.autocash_hierarchy_id%TYPE
57 				);
58 
59 --------------------------------------
60 -- declaration of public procedures and functions
61 --------------------------------------
62 
63 /**
64  * PROCEDURE retrieve_globals
65  *
66  * DESCRIPTION
67  *     	This procedure retrieves operating unit attributes from the database
68  *	and stores them into the specified data structure.
69  *
70  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
71  *
72  * ARGUMENTS
73  *   IN:
74  *   IN/OUT:
75  *   OUT:
76  *	p_globals			The global variables from AR System
77  *					parameters used in TCA.
78  *
79  * NOTES
80  *
81  * MODIFICATION HISTORY
82  *
83  *   12-MAY-2005    Rajib Ranjan Borah   o TCA SSA Uptake (Bug 3456489). Created.
84  *
85  */
86 
87 PROCEDURE retrieve_globals(
88         p_globals	OUT	NOCOPY	GlobalsTable
89 );
90 /**
91  * FUNCTION get_org_attributes
92  *
93  * DESCRIPTION
94  *     	Checks whether the specified org exists in the cache and returns the
95  *	attributes if the org exists.
96  *
97  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
98  *
99  * ARGUMENTS
100  *   IN:
101  *     p_org_id_in			Organization ID
102  *
103  *   IN/OUT:
104  *   OUT:
105  *
106  * RETURNS:
107  *	GlobalsRecord			Attributes corresponding to the Org.
108  *
109  * NOTES
110  *
111  * MODIFICATION HISTORY
112  *
113  *   12-MAY-2005    Rajib Ranjan Borah   o TCA SSA Uptake (Bug 3456489). Created.
114  */
115 
116 FUNCTION get_org_attributes	(
117         p_org_id		IN	NUMBER
118 				)
119 RETURN	hz_mo_global_cache.GlobalsRecord;
120 
121 /**
122  * FUNCTION get_auto_site_numbering
123  *
124  * DESCRIPTION
125  *     	Returns the Site Number Generation Setting for the org.
126  *
127  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
128  *
129  * ARGUMENTS
130  *   IN:
131  *     p_org_id_in			Organization ID
132  *
133  *   IN/OUT:
134  *   OUT:
135  *
136  * RETURNS:
137  *	Auto_Site_Numbering		Auto_site_numbering setting for the Org.
138  *
139  * NOTES
140  *
141  * MODIFICATION HISTORY
142  *
146 FUNCTION get_auto_site_numbering(
143  *   12-MAY-2005    Rajib Ranjan Borah   o TCA SSA Uptake (Bug 3456489). Created.
144  */
145 
147         p_org_id		IN	NUMBER
148 				)
149 RETURN	varchar2;
150 
151 /**
152  * FUNCTION get_default_country
153  *
154  * DESCRIPTION
155  *     	Returns the default country for the org.
156  *
157  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
158  *
159  * ARGUMENTS
160  *   IN:
161  *     p_org_id_in			Organization ID
162  *
163  *   IN/OUT:
164  *   OUT:
165  *
166  * RETURNS:
167  *	Country_code			Default Country for the Org.
168  *
169  * NOTES
170  *
171  * MODIFICATION HISTORY
172  *
173  *   12-MAY-2005    Rajib Ranjan Borah   o TCA SSA Uptake (Bug 3456489). Created.
174  */
175 
176 FUNCTION get_default_country	(
177         p_org_id		IN	NUMBER
178 				)
179 RETURN	varchar2;
180 
181 /**
182  * FUNCTION get_location_structure_id
183  *
184  * DESCRIPTION
185  *     	Returns the location structure for the org.
186  *
187  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
188  *
189  * ARGUMENTS
190  *   IN:
191  *     p_org_id_in			Organization ID
192  *
193  *   IN/OUT:
194  *   OUT:
195  *
196  * RETURNS:
197  *	Location_structure_id		Location structure for the org.
198  *
199  * NOTES
200  *
201  * MODIFICATION HISTORY
202  *
203  *   14-JUN-2005    Ramesh Ch     o Customer Merge SSA Uptake   Created.
204  */
205 
206 FUNCTION get_location_structure_id(
207         p_org_id		IN	NUMBER
208 				)
209 RETURN	number;
210 
211 /**
215  *     	Returns the tax method for the org.
212  * FUNCTION get_tax_method
213  *
214  * DESCRIPTION
216  *
217  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
218  *
219  * ARGUMENTS
220  *   IN:
221  *     p_org_id_in		Organization ID
222  *
223  *   IN/OUT:
224  *   OUT:
225  *
226  * RETURNS:
227  *	Tax_method		Tax method for the org.
228  *
229  * NOTES
230  *
231  * MODIFICATION HISTORY
232  *
233  *   14-JUN-2005    Ramesh Ch     o Customer Merge SSA Uptake   Created.
234  */
235 
236 FUNCTION get_tax_method(
237         p_org_id		IN	NUMBER
238 				)
239 RETURN	varchar2;
240 
241 /**
242  * FUNCTION get_chart_of_accounts_id
243  *
244  * DESCRIPTION
245  *     	Returns the chart of accounts ID for the org.
246  *
247  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
248  *
249  * ARGUMENTS
250  *   IN:
251  *     p_org_id_in			Organization ID
252  *
253  *   IN/OUT:
254  *   OUT:
255  *
256  * RETURNS:
257  *	Chart_of_Accounts_ID		Chart of Accounts ID for the Org.
258  *
259  * NOTES
260  *
261  * MODIFICATION HISTORY
262  *
263  *   12-MAY-2005    Rajib Ranjan Borah   o TCA SSA Uptake (Bug 3456489). Created.
264  */
265 
266 FUNCTION get_chart_of_accounts_id(
267         p_org_id		IN	NUMBER
268 				)
269 RETURN	number;
270 
271 /**
272  * FUNCTION get_set_of_books_id
273  *
274  * DESCRIPTION
275  *     	Returns the Set of Books ID for the org.
276  *
277  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
278  *
279  * ARGUMENTS
280  *   IN:
281  *     p_org_id_in			Organization ID
282  *
283  *   IN/OUT:
284  *   OUT:
285  *
286  * RETURNS:
287  *	Set_of_Books_ID			Set of Books ID for the Org.
288  *
289  * NOTES
290  *
291  * MODIFICATION HISTORY
292  *
293  *   12-MAY-2005    Rajib Ranjan Borah   o TCA SSA Uptake (Bug 3456489). Created.
294  */
295 
296 FUNCTION get_set_of_books_id	(
297         p_org_id		IN	NUMBER
298 				)
299 RETURN	number;
300 
301 /**
302  * FUNCTION get_generate_customer_number
303  *
304  * DESCRIPTION
305  *     	Returns the Customer Number Generation Setting for the org.
306  *
307  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
308  *
309  * ARGUMENTS
310  *   IN:
311  *   IN/OUT:
312  *   OUT:
313  *
314  * RETURNS:
315  *	Customer_Number_Generate	Customer Number generate setting for
316  *					the Org.
317  *
318  * NOTES
319  *
320  * MODIFICATION HISTORY
321  *
322  *   12-MAY-2005    Rajib Ranjan Borah   o TCA SSA Uptake (Bug 3456489). Created.
323  */
324 
325 FUNCTION get_generate_customer_number
329 /**
326 RETURN	varchar2;
327 
328 
330  * FUNCTION get_address_validation
331  *
332  * DESCRIPTION
333  *     	Returns the error or warning to be issued during the failure of
334  *      address validation.
335  *
336  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
337  *
338  * ARGUMENTS
339  *   IN:
340  *   IN/OUT:
341  *   OUT:
342  *
343  * RETURNS:
344  *
345  * NOTES
346  *
347  * MODIFICATION HISTORY
348  *
349  *   24-JUN-2005    Kalyan   o TCA SSA Uptake (Bug 4454799). Created.
350  */
351 
352 FUNCTION get_address_validation( p_org_id IN NUMBER )
353 RETURN	varchar2;
354 
355 
356 /**
357  * PROCEDURE validate_orgid_pub_api
358  *
359  * DESCRIPTION
360  *     	Wrapper around MO_GLOBAL.validate_orgid_pub_api
361  *      Extra functionality -
362  *       IF passed ORG_ID is null
363  *        + no default org_id based on profile was found by MO_GLOBAL
364  *       {
365  *          IF security settings allow user access to set of OUs
366  *             RETURN one OU from that set and set STATUS = 'R' (random)
367  *          ELSE
368  *             Allow default behavior. Bubble up MO_GLOBAL raised exception
369  *       }
370  *
371  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
372  *
373  * ARGUMENTS
374  *   IN:
375  *              ERROR_MESG_SUPPR   IN            VARCHAR2  DEFAULT 'N'
376  *   IN/OUT:
377  *              ORG_ID             IN OUT NOCOPY NUMBER
378  *   OUT:
379  *              STATUS             OUT    NOCOPY VARCHAR2
380  *
381  * RETURNS:
382  *
383  * NOTES !!DONT USE WITHOUT DISCUSSING WITH TCA DEVELOPMENT!!
384  *
385  * MODIFICATION HISTORY
386  *
387  *   24-MAR-2006    Vivek Nama     Bug 5107334 Created
388  */
389 PROCEDURE validate_orgid_pub_api(
390   ORG_ID             IN OUT NOCOPY NUMBER,
391   ERROR_MESG_SUPPR   IN            VARCHAR2  DEFAULT 'N',
392   STATUS             OUT    NOCOPY VARCHAR2);
393 
394 /**
395  * FUNCTION get_create_reciprocal_flag
396  *
397  * DESCRIPTION
398  *      Returns the Reciprocal Flag setting for the org
399  *
400  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
401  *
402  * ARGUMENTS
403  *   IN:
404  *   IN/OUT:
405  *   OUT:
406  *
407  * RETURNS:
408  *      Create Reciprocal Flag setting for the org
409  *
410  * NOTES
411  *
412  * MODIFICATION HISTORY
413  *
414  *   03-APR-2006    Dhaval Mehta    Bug 5002547 : Added
415  *
416  **/
417 
418 FUNCTION get_create_reciprocal_flag(
419          p_org_id IN NUMBER)
420 RETURN varchar2;
421 
422 
423 /**
424  * FUNCTION get_autocash_hierarchy_id
425  *
426  * DESCRIPTION
427  *      Returns the Autocash Rule setting for the org
428  *
429  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
430  *
431  * ARGUMENTS
432  *   IN:
433  *   IN/OUT:
434  *   OUT:
435  *
436  * RETURNS:
437  *      Autocash Hierarchy ID setting for the org
438  *
439  * NOTES
440  *
441  * MODIFICATION HISTORY
442  *
443  *   03-APR-2006    Dhaval Mehta    Bug 5002547 : Added
444  *
445  **/
446 
447 FUNCTION get_autocash_hierarchy_id
448 RETURN NUMBER;
449 
450 
451 /**
452  * FUNCTION get_default_grouping_rule_id
453  *
454  * DESCRIPTION
455  *      Returns the Default Group Rule setting for the org
456  *
457  * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
458  *
459  * ARGUMENTS
460  *   IN:
461  *   IN/OUT:
462  *   OUT:
463  *
464  * RETURNS:
465  *      Default Grouping Rule ID setting for the org
466  *
467  * NOTES
468  *
472  *
469  * MODIFICATION HISTORY
470  *
471  *   03-APR-2006    Dhaval Mehta    Bug 5002547 : Added
473  **/
474 
475 FUNCTION get_default_grouping_rule_id
476 RETURN NUMBER;
477 
478 END HZ_MO_GLOBAL_CACHE;
479