DBA Data[Home] [Help]

PACKAGE: APPS.INV_LE_TIMEZONE_PUB

Source


1 PACKAGE INV_LE_TIMEZONE_PUB AUTHID CURRENT_USER as
2 /*$Header: INVTZLES.pls 115.3 2003/10/14 18:09:57 fdubois noship $ */
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  |    fdubois    29-sep-03  Created                                          |
31  |                                                                           |
32  +===========================================================================*/
33 FUNCTION Get_Le_Sysdate_For_Ou
34 (p_ou_id    IN NUMBER
35 )
36 RETURN DATE;
37 
38 
39 /*===========================================================================+
40  | Function                                                                  |
41  |               GET_LE_DAY_FOR_INV_ORG                                      |
42  |                                                                           |
43  | DESCRIPTION                                                               |
44  |               The function accepts a transaction datetime in the server   |
45  |               timezone and and an inventory organization ID, finds the    |
46  |               legal entity for the inventory organization, converts the   |
47  |               datetime to the legal entity timezone, truncates the        |
48  |               timestamps and return the date.                             |
49  |               If legal entity timezone is not setup then no conversion    |
50  |               occurs.                                                     |
51  |                                                                           |
52  | SCOPE - PUBLIC                                                            |
53  |                                                                           |
54  |                                                                           |
55  | ARGUMENTS  :  IN : p_trxn_date                                            |
56  |                    p_inv_org_id                                           |
57  |               OUT :                                                       |
58  |                                                                           |
59  | RETURNS    :  DATE                                                        |
60  |                                                                           |
61  | NOTES                                                                     |
62  |                                                                           |
63  | MODIFICATION HISTORY                                                      |
64  |    fdubois    29-sep-03  Created                                          |
65  |                                                                           |
66  +===========================================================================*/
67 FUNCTION Get_Le_Day_For_Inv_org
68 (p_trxn_date    IN DATE
69 ,p_inv_org_id   IN NUMBER
70 )
71 RETURN DATE;
72 
73 
74 /*===========================================================================+
75  | Function                                                                  |
76  |               GET_LE_DAY_FOR_OU                                           |
77  |                                                                           |
78  | DESCRIPTION                                                               |
79  |               The function accepts a transaction datetime in the server   |
80  |               timezone and an operating unit ID. It finds the legal       |
81  |               entity for the operating unit and converts the              |
82  |               datetime to the legal entity timezone, truncates the        |
83  |               timestamps and return the date.                             |
84  |               If legal entity timezone is not setup then no conversion    |
85  |               occurs.                                                     |
86  |                                                                           |
87  | SCOPE - PUBLIC                                                            |
88  |                                                                           |
89  |                                                                           |
90  | ARGUMENTS  :  IN : p_trxn_date                                            |
91  |                    p_ou_id                                                |
92  |               OUT:                                                        |
93  |                                                                           |
94  | RETURNS    :  DATE                                                        |
95  |                                                                           |
96  | NOTES                                                                     |
97  |                                                                           |
98  | MODIFICATION HISTORY                                                      |
99  |    fdubois    29-sep-03  Created                                          |
100  |                                                                           |
101  +===========================================================================*/
102 FUNCTION Get_Le_Day_For_Ou
103 (p_trxn_date    IN DATE
104 ,p_ou_id        IN NUMBER
105 )
106 RETURN DATE;
107 
108 
109 /*===========================================================================+
110  | Function                                                                  |
111  |               GET_LE_DAY_TIME_FOR_OU                                      |
112  |                                                                           |
113  | DESCRIPTION                                                               |
114  |               The function accepts a transaction datetime in the server   |
115  |               timezone and an operating unit ID. It finds the legal       |
116  |               entity for the operating unit and converts the              |
117  |               datetime to the legal entity timezone.                      |
118  |               If legal entity timezone is not setup then no conversion    |
119  |               occurs.                                                     |
120  |                                                                           |
121  | SCOPE - PUBLIC                                                            |
122  |                                                                           |
123  |                                                                           |
124  | ARGUMENTS  :  IN : p_trxn_date                                            |
125  |                  : p_ou_id                                                |
126  |               OUT:                                                        |
127  |                                                                           |
128  | RETURNS    :  DATE                                                        |
129  |                                                                           |
130  | NOTES                                                                     |
131  |                                                                           |
132  | MODIFICATION HISTORY                                                      |
133  |    fdubois    29-sep-03  Created                                          |
134  |                                                                           |
135  +===========================================================================*/
136 FUNCTION Get_Le_Day_Time_For_Ou
137 (p_trxn_date    IN DATE
138 ,p_ou_id        IN NUMBER
139 )
140 RETURN DATE;
141 
142 
143 /*===========================================================================+
144  | Function                                                                  |
145  |               GET_LE_TZ_CODE_FOR_INV_ORG                                  |
146  |                                                                           |
147  | DESCRIPTION                                                               |
148  |               The function accepts an inventory organization ID and finds |
149  |               timezone code for the legal entity.                         |
150  |               If legal entity timezone is not setup then NULL is          |
151  |               returned.                                                   |
152  |                                                                           |
153  | SCOPE - PUBLIC                                                            |
154  |                                                                           |
155  |                                                                           |
156  | ARGUMENTS  :  IN : p_inv_org_id                                           |
157  |               OUT:                                                        |
158  |                                                                           |
159  | RETURNS    :  VARCHAR2                                                    |
160  |                                                                           |
161  | NOTES                                                                     |
162  |                                                                           |
163  | MODIFICATION HISTORY                                                      |
164  |    fdubois    29-sep-03  Created                                          |
165  |                                                                           |
166  +===========================================================================*/
167 FUNCTION Get_Le_Tz_Code_For_Inv_Org
168 (p_inv_org_id   IN NUMBER
169 )
170 RETURN VARCHAR2 ;
171 
172 
173 /*===========================================================================+
174  | Function                                                                  |
175  |               GET_LE_TZ_CODE_FOR_OU                                       |
176  |                                                                           |
177  | DESCRIPTION                                                               |
178  |               The function accepts an operating unit 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_ou_id                                                |
187  |               OUT:                                                        |
188  |                                                                           |
189  | RETURNS    :  VARCHAR2                                                    |
190  |                                                                           |
191  | NOTES                                                                     |
192  |                                                                           |
193  | MODIFICATION HISTORY                                                      |
194  |    fdubois    29-sep-03  Created                                          |
198 (p_ou_id        IN NUMBER
195  |                                                                           |
196  +===========================================================================*/
197 FUNCTION Get_Le_Tz_Code_For_Ou
199 )
200 RETURN VARCHAR2;
201 
202 
203 /*===========================================================================+
204  | Function                                                                  |
205  |               GET_SERVER_DAY_TIME_FOR_LE                                  |
206  |                                                                           |
207  | DESCRIPTION                                                               |
208  |               The function accepts a legal entity ID and a legal entity   |
209  |               datetime parameters and converts it to the server timezone. |
210  |               If Legal entity timezone is not setup then no conversion    |
211  |               occurs.                                                     |
212  |                                                                           |
213  | SCOPE - PUBLIC                                                            |
214  |                                                                           |
215  |                                                                           |
216  | ARGUMENTS  :  IN : p_le_date                                              |
217  |                  : p_le_id                                                |
218  |               OUT:                                                        |
219  |                                                                           |
220  | RETURNS    :  DATE                                                        |
221  |                                                                           |
222  | NOTES                                                                     |
223  |                                                                           |
224  | MODIFICATION HISTORY                                                      |
225  |    fdubois    29-sep-03  Created                                          |
226  |                                                                           |
227  +===========================================================================*/
228 FUNCTION Get_Server_Day_Time_For_Le
229 (p_le_date      IN DATE
230 ,p_le_id        IN NUMBER
231 )
232 RETURN DATE;
233 
234 
235 /*===========================================================================+
236  | Function                                                                  |
237  |               GET_LE_DAY_FOR_SERVER                                       |
238  |                                                                           |
239  | DESCRIPTION                                                               |
240  |               The function accepts a transaction datetime in the server   |
241  |               timezone and the legal entity id, then converts the         |
242  |               datetime to the legal entity timezone, truncates the        |
243  |               timestamps and return the date.                             |
244  |               If legal entity timezone is not setup then no conversion    |
245  |               occurs.                                                     |
246  |                                                                           |
247  | SCOPE - PUBLIC                                                            |
248  |                                                                           |
249  |                                                                           |
250  | ARGUMENTS  :  IN : p_trxn_date                                            |
251  |                    p_inv_org_id                                           |
252  |               OUT :                                                       |
253  |                                                                           |
254  | RETURNS    :  DATE                                                        |
255  |                                                                           |
256  | NOTES                                                                     |
257  |                                                                           |
258  | MODIFICATION HISTORY                                                      |
259  |    fdubois    29-sep-03  Created                                          |
260  |                                                                           |
261  +===========================================================================*/
262 FUNCTION Get_Le_Day_For_Server
263 (p_trxn_date    IN DATE
264 ,p_le_id        IN NUMBER
265 )
266 RETURN DATE;
267 
268 
269 END  INV_LE_TIMEZONE_PUB;