DBA Data[Home] [Help]

PACKAGE: APPS.XLE_LE_TIMEZONE_GRP

Source


1 PACKAGE XLE_LE_TIMEZONE_GRP as
2 -- $Header: xlegltzs.pls 120.1.12000000.2 2007/02/07 19:23:33 jmary ship $
3 
4 --=============================================================================
5 -- PROCEDURES AND FUNCTIONS
6 --=============================================================================
7 
8 /*===========================================================================+
9  | Function                                                                  |
10  |               GET_LE_SYSDATE_FOR_OU                                       |
11  |                                                                           |
12  | DESCRIPTION                                                               |
13  |               This function selects SYSDATE, converts it to the legal     |
14  |               entity timezone associated to the operating unit and removes|
15  |               the timestamp returning the date with 00:00:00 for the time.|
16  |               If the legal entity timezone is not setup then              |
17  |               TRUNC(SYSDATE) is returned.                                 |
18  |                                                                           |
19  | SCOPE - PUBLIC                                                            |
20  |                                                                           |
21  |                                                                           |
22  | ARGUMENTS  :  IN: p_ou_id                                                 |
23  |               OUT:                                                        |
24  |                                                                           |
25  | RETURNS    :  DATE                                                        |
26  |                                                                           |
27  | NOTES                                                                     |
28  |                                                                           |
29  | MODIFICATION HISTORY                                                      |
30  |    RBASKER    29-Jun-2005  Created                                          |
31  |                                                                           |
32  +===========================================================================*/
33 FUNCTION Get_Le_Sysdate_For_Ou
34 (p_ou_id    IN NUMBER
35 )
36 RETURN DATE;
37 
38 /*===========================================================================+
39  | Function                                                                  |
40  |               GET_LE_SYSDATE_FOR_INV_ORG                                  |
41  |                                                                           |
42  | DESCRIPTION                                                               |
43  |               This function selects SYSDATE, converts it to the legal     |
44  |               entity timezone associated to the inventotry org and removes|
45  |               the timestamp returning the date with 00:00:00 for the time.|
46  |               If the legal entity timezone is not setup then              |
47  |               TRUNC(SYSDATE) is returned.                                 |
48  |                                                                           |
49  | SCOPE - PUBLIC                                                            |
50  |                                                                           |
51  |                                                                           |
52  | ARGUMENTS  :  IN: p_ou_id                                                 |
53  |               OUT:                                                        |
54  |                                                                           |
55  | RETURNS    :  DATE                                                        |
56  |                                                                           |
57  | NOTES                                                                     |
58  |                                                                           |
59  | MODIFICATION HISTORY                                                      |
60  |    RBASKER    29-Jun-2005  Created                                          |
61  |                                                                           |
62  +===========================================================================*/
63 FUNCTION Get_Le_Sysdate_For_Inv_Org
64 (p_inv_org_id    IN NUMBER
65 )
66 RETURN DATE;
67 
68 
69 /*===========================================================================+
70  | Function                                                                  |
71  |               GET_LE_DAY_FOR_INV_ORG                                      |
72  |                                                                           |
73  | DESCRIPTION                                                               |
74  |               The function accepts a transaction datetime in the server   |
75  |               timezone and and an inventory organization ID, finds the    |
76  |               legal entity for the inventory organization, converts the   |
77  |               datetime to the legal entity timezone, truncates the        |
78  |               timestamps and return the date.                             |
79  |               If legal entity timezone is not setup then no conversion    |
80  |               occurs.                                                     |
81  |                                                                           |
82  | SCOPE - PUBLIC                                                            |
83  |                                                                           |
84  |                                                                           |
85  | ARGUMENTS  :  IN : p_trxn_date                                            |
86  |                    p_inv_org_id                                           |
87  |               OUT :                                                       |
88  |                                                                           |
89  | RETURNS    :  DATE                                                        |
90  |                                                                           |
91  | NOTES                                                                     |
92  |                                                                           |
93  | MODIFICATION HISTORY                                                      |
94  |    RBASKER    29-Jun-2005  Created                                        |
95  |                                                                           |
96  +=========================================================================== */
97 FUNCTION Get_Le_Day_For_Inv_org
98 (p_trxn_date    IN DATE
99 ,p_inv_org_id   IN NUMBER
100 )
101 RETURN DATE;
102 
103 
104 /*===========================================================================+
105  | Function                                                                  |
106  |               GET_LE_DAY_FOR_OU                                           |
107  |                                                                           |
108  | DESCRIPTION                                                               |
109  |               The function accepts a transaction datetime in the server   |
110  |               timezone and an operating unit ID. It finds the legal       |
111  |               entity for the operating unit and converts the              |
112  |               datetime to the legal entity timezone, truncates the        |
113  |               timestamps and return the date.                             |
114  |               If legal entity timezone is not setup then no conversion    |
115  |               occurs.                                                     |
116  |                                                                           |
117  | SCOPE - PUBLIC                                                            |
118  |                                                                           |
119  |                                                                           |
120  | ARGUMENTS  :  IN : p_trxn_date                                            |
121  |                    p_ou_id                                                |
122  |               OUT:                                                        |
123  |                                                                           |
124  | RETURNS    :  DATE                                                        |
125  |                                                                           |
126  | NOTES                                                                     |
127  |                                                                           |
128  | MODIFICATION HISTORY                                                      |
129  |    RBASKER    29-Jun-2005  Created                                          |
130  |                                                                           |
131  +=========================================================================== */
132 FUNCTION Get_Le_Day_For_Ou
133 (p_trxn_date    IN DATE
134 ,p_ou_id        IN NUMBER
135 )
136 RETURN DATE;
137 
138 
139 /*===========================================================================+
140  | Function                                                                  |
141  |               GET_LE_DAY_TIME_FOR_OU                                      |
142  |                                                                           |
143  | DESCRIPTION                                                               |
144  |               The function accepts a transaction datetime in the server   |
145  |               timezone and an operating unit ID. It finds the legal       |
146  |               entity for the operating unit and converts the              |
147  |               datetime to the legal entity timezone.                      |
148  |               If legal entity timezone is not setup then no conversion    |
149  |               occurs.                                                     |
150  |                                                                           |
151  | SCOPE - PUBLIC                                                            |
152  |                                                                           |
153  |                                                                           |
154  | ARGUMENTS  :  IN : p_trxn_date                                            |
155  |                  : p_ou_id                                                |
156  |               OUT:                                                        |
157  |                                                                           |
158  | RETURNS    :  DATE                                                        |
159  |                                                                           |
160  | NOTES                                                                     |
161  |                                                                           |
162  | MODIFICATION HISTORY                                                      |
163  |    RBASKER    29-Jun-2005  Created                                          |
164  |                                                                           |
165  +=========================================================================== */
166 FUNCTION Get_Le_Day_Time_For_Ou
167 (p_trxn_date    IN DATE
168 ,p_ou_id        IN NUMBER
169 )
170 RETURN DATE;
171 
172 
173 /*===========================================================================+
174  | Function                                                                  |
175  |               GET_LE_TZ_CODE_FOR_INV_ORG                                  |
176  |                                                                           |
177  | DESCRIPTION                                                               |
178  |               The function accepts an inventory organization ID and finds |
179  |               timezone code for the legal entity.                         |
180  |               If legal entity timezone is not setup then NULL is          |
181  |               returned.                                                   |
182  |                                                                           |
183  | SCOPE - PUBLIC                                                            |
184  |                                                                           |
185  |                                                                           |
186  | ARGUMENTS  :  IN : p_inv_org_id                                           |
187  |               OUT:                                                        |
188  |                                                                           |
189  | RETURNS    :  VARCHAR2                                                    |
190  |                                                                           |
191  | NOTES                                                                     |
192  |                                                                           |
193  | MODIFICATION HISTORY                                                      |
194  |    RBASKER    29-Jun-2005  Created                                          |
195  |                                                                           |
196  +=========================================================================== */
197 FUNCTION Get_Le_Tz_Code_For_Inv_Org
198 (p_inv_org_id   IN NUMBER
199 )
200 RETURN VARCHAR2 ;
201 
202 
203 /*===========================================================================+
204  | Function                                                                  |
205  |               GET_LE_TZ_CODE_FOR_OU                                       |
206  |                                                                           |
207  | DESCRIPTION                                                               |
208  |               The function accepts an operating unit id and finds         |
209  |               timezone code for the legal entity.                         |
210  |               If legal entity timezone is not setup then NULL is          |
211  |               returned.                                                   |
212  |                                                                           |
213  | SCOPE - PUBLIC                                                            |
214  |                                                                           |
215  |                                                                           |
216  | ARGUMENTS  :  IN : p_ou_id                                                |
217  |               OUT:                                                        |
218  |                                                                           |
219  | RETURNS    :  VARCHAR2                                                    |
220  |                                                                           |
221  | NOTES                                                                     |
222  |                                                                           |
223  | MODIFICATION HISTORY                                                      |
224  |    RBASKER    29-Jun-2005  Created                                        |
225  |                                                                           |
226  +=========================================================================== */
227 FUNCTION Get_Le_Tz_Code_For_Ou
228 (p_ou_id        IN NUMBER
229 )
230 RETURN VARCHAR2;
231 
232 
233 /*===========================================================================+
234  | Function                                                                  |
235  |               GET_SERVER_DAY_TIME_FOR_LE                                  |
239  |               datetime parameters and converts it to the server timezone. |
236  |                                                                           |
237  | DESCRIPTION                                                               |
238  |               The function accepts a legal entity ID and a legal entity   |
240  |               If Legal entity timezone is not setup then no conversion    |
241  |               occurs.                                                     |
242  |                                                                           |
243  | SCOPE - PUBLIC                                                            |
244  |                                                                           |
245  |                                                                           |
246  | ARGUMENTS  :  IN : p_le_date                                              |
247  |                  : p_le_id                                                |
248  |               OUT:                                                        |
249  |                                                                           |
250  | RETURNS    :  DATE                                                        |
251  |                                                                           |
252  | NOTES                                                                     |
253  |                                                                           |
254  | MODIFICATION HISTORY                                                      |
255  |    RBASKER    29-Jun-2005  Created                                        |
256  |                                                                           |
257  +=========================================================================== */
258 FUNCTION Get_Server_Day_Time_For_Le
259 (p_le_date      IN DATE
260 ,p_le_id        IN NUMBER
261 )
262 RETURN DATE;
263 
264 
265 /*===========================================================================+
266  | Function                                                                  |
270  |               The function accepts a transaction datetime in the server   |
267  |               GET_LE_DAY_FOR_SERVER                                       |
268  |                                                                           |
269  | DESCRIPTION                                                               |
271  |               timezone and the legal entity id, then converts the         |
272  |               datetime to the legal entity timezone, truncates the        |
273  |               timestamps and return the date.                             |
274  |               If legal entity timezone is not setup then no conversion    |
275  |               occurs.                                                     |
276  |                                                                           |
277  | SCOPE - PUBLIC                                                            |
278  |                                                                           |
279  |                                                                           |
280  | ARGUMENTS  :  IN : p_trxn_date                                            |
281  |                    p_inv_org_id                                           |
282  |               OUT :                                                       |
283  |                                                                           |
284  | RETURNS    :  DATE                                                        |
285  |                                                                           |
286  | NOTES                                                                     |
287  |                                                                           |
288  | MODIFICATION HISTORY                                                      |
289  |    RBASKER    29-Jun-2005  Created                                        |
290  |                                                                           |
291  +===========================================================================*/
292 FUNCTION Get_Le_Day_For_Server
293 (p_trxn_date    IN DATE
294 ,p_le_id        IN NUMBER
295 )
296 RETURN DATE;
297 
298 
299 
300 /*===========================================================================+
301  | Function                                                                  |
302  |               GET_LE_DAY_TIME_FOR_SERVER                                       |
303  |                                                                           |
304  | DESCRIPTION                                                               |
305  |               The function accepts a transaction datetime in the server   |
306  |               timezone and the legal entity id, then converts the         |
307  |               datetime to the legal entity timezone and return the date.  |
308  |               If legal entity timezone is not setup then no conversion    |
309  |               occurs.                                                     |
310  |                                                                           |
311  | SCOPE - PUBLIC                                                            |
312  |                                                                           |
313  |                                                                           |
314  | ARGUMENTS  :  IN : p_trxn_date                                            |
315  |                    p_le_id                                           |
316  |               OUT :                                                       |
317  |                                                                           |
318  | RETURNS    :  DATE                                                        |
319  |                                                                           |
320  | NOTES                                                                     |
321  |                                                                           |
322  | MODIFICATION HISTORY                                                      |
323  |    JAMRY 06-NOV-06  Created                                               |
324  |                                                                           |
325  +===========================================================================*/
326 FUNCTION Get_Le_Day_Time_For_Server
327 (p_trxn_date    IN DATE
328 ,p_le_id        IN NUMBER
329 )
330 RETURN DATE;
331 
332 
333 END  XLE_LE_TIMEZONE_GRP;