DBA Data[Home] [Help]

PACKAGE: APPS.FA_CHK_BOOKSTS_PKG

Source


1 PACKAGE FA_CHK_BOOKSTS_PKG as
2 /* $Header: FAXCKBKS.pls 120.3 2006/08/24 14:21:46 bridgway ship $ */
3 
4 --
5 -- savepoint indicator, sets TRUE if savepoint has been created
6 --
7   savepoint_set  BOOLEAN := FALSE;
8 
9 
10 /* ---------------------------------------------------------------------
11  |   Name
12  |        faxcbsx
13  |
14  |   Description
15  |
16  |        Check book status user exit entry function.
17  |        Calls faxcbs to check the status of the book and returns TRUE
18  |        if depreciation submission is allowed.
19  |
20  |
21  |   Parameters
22  |        X_book  - book_type_code for which status is checked
23  |
24  |   Returns
25  |        TRUE if successful, FALSE otherwise
26  |
27  |   Notes
28  |
29  |   History
30  |        03-Feb-1997           LSON              Created
31  |
32  + -------------------------------------------------------------------- */
33 
34 FUNCTION faxcbsx(X_book        IN    VARCHAR2,
35 		 X_init_message_flag VARCHAR2 DEFAULT 'NO',
36                  X_close_period IN   NUMBER DEFAULT 1,
37 		 p_log_level_rec            IN  FA_API_TYPES.log_level_rec_type default null)
38         return BOOLEAN;
39 
40 /* ---------------------------------------------------------------------
41  |   Name
42  |        faxcrb
43  |
44  |   Description
45  |        This function Checks the Reporting Books for a Primary Book.
46  |        This function has been created to check the depreciation status
47  |        and the current on all the associated reporting books of a MRC
48  |        enabled Book. If depreciation has errored on a reporting book
49  |        or has not yet been run on all the reporting books, we will
50  |        false and prevent the transaction.
51  |
52  |   Parameters
53  |        X_book  - book_type_code
54  |        X_txn_type  - type of transaction performed on Primary Book
55  |
56  |   Returns
57  |        TRUE if successful, FALSE otherwise
58  |
59  |   Notes
60  |
61  |   History
62  |        02-Dec-1997      SNARAYAN       Created
63  |        11-Aug-2001      BRIDGWAY       Added asset_id and close_period
64  |
65  + -------------------------------------------------------------------- */
66 
67 FUNCTION faxcrb(X_book         IN  VARCHAR2,
68                 X_trx_type     IN VARCHAR2,
69                 X_asset_id     IN NUMBER,
70                 X_close_period IN NUMBER,
71 		p_log_level_rec            IN  FA_API_TYPES.log_level_rec_type default null)
72              return BOOLEAN;
73 
74 /* ---------------------------------------------------------------------
75  |   Name
76  |        faxcbs
77  |
78  |   Description
79  |
80  |      Check the status of any processes on the book or its
81  |        associated CORP book or TAX books
82  |      Calls faxcps to check to see if any processes running on
83  |        the book is pending,inactive,or running. If so, txn is
84  |        not allowed.
85  |      Calls faxptb if Corp book and txn type is TRANSFER or RECLASS
86  |        and checks all associated TAX book status.
87  |      Calls faxgcb if TAX book and checks its associated CORP book
88  |        to see if any processes running on the corp books is MASS
89  |        transfer or Mass additions post. If so, txn not allowed
90  |
91  |
92  |   Parameters
93  |        X_book  - book_type_code for which status is checked
94  |        X_submit - TRUE, if request is for depreciation
95  |        X_start - TRUE if mass trx should be resubmitted.
96  |        X_asset_id - 0 for mass trx, other for individual txns
97  |        X_trx_type - transaction type code of transaction
98  |        X_result - TRUE if txn allowed, FALSE otherwise
99  |
100  |   Returns
101  |        TRUE if successful, FALSE otherwise
102  |
103  |   Notes
104  |
105  |   History
106  |        03-Feb-1997      LSON           Created
107  |        11-Aug-2001      BRIDGWAY       Added close_period
108  |
109  + -------------------------------------------------------------------- */
110 
111 FUNCTION faxcbs(X_book         IN    VARCHAR2,
112                 X_submit       IN    BOOLEAN,
113                 X_start        IN    BOOLEAN,
114                 X_asset_id     IN    NUMBER,
115                 X_trx_type     IN    VARCHAR2,
116                 X_txn_status   IN OUT NOCOPY   BOOLEAN,
117                 X_close_period IN    NUMBER DEFAULT 1,
118 		p_log_level_rec            IN  FA_API_TYPES.log_level_rec_type default null)
119         return BOOLEAN;
120 
121 /* ---------------------------------------------------------------------
122  |   Name
123  |        faxcps
124  |
125  |   Description
126  |
127  |        Check processes status.
128  |        Calls faxcms to check the status of any process
129  |        running on the book.
130  |
131  |   Parameters
132  |        X_book  - book for transaction status is checked
133  |        X_submit  - TRUE, if request for depreciation
134  |                    FALSE, otherwise
135  |        X_start - TRUE, if trx should be resubmitted
136  |        X_asset_id - 0 for mass_trx, other for individual transactions
137  |        X_txn_status - TRUE, if txns is allowed.
138  |
139  |   Returns
140  |        TRUE if successful, FALSE otherwise
141  |
142  |   Notes
143  |
144  |   History
145  |        03-Feb-1997      LSON           Created
146  |        11-Aug-2001      BRIDGWAY       Added close_period
147  |
148  + -------------------------------------------------------------------- */
149 
150 
151 FUNCTION faxcps(X_book         IN    VARCHAR2,
152                 X_submit       IN    BOOLEAN,
153                 X_start        IN    BOOLEAN,
154                 X_asset_id     IN    NUMBER,
155                 X_trx_type     IN    VARCHAR2,
156                 X_txn_status   IN OUT NOCOPY   BOOLEAN,
157                 X_close_period IN    NUMBER,
158 		p_log_level_rec            IN  FA_API_TYPES.log_level_rec_type default null)
159              return BOOLEAN;
160 
161 
162 /* ---------------------------------------------------------------------
163  |   Name
164  |        faxcds
165  |
166  |   Description
167  |        Checks Depreciation status.
168  |        Gets DEPRN_STATUS and DEPRN_REQUEST_ID from FA_BOOK_CONTROLS.
169  |        If deprn is running,inactive,or pending, trx is not approved.
170  |        If requested process is depreciation, it is allowed even though
171  |        last deprn errored out. A mass process is only allowed for deprn status
172  |        complete.
173  |
174  |   Parameters
175  |        X_book  - book for which txn status is checked
176  |        X_submit - true if submitting depreciation
177  |        X_asset_id -  asset for which txn approval is required
178  |        X_trx_type - transaction type being done for the asset
179  |        X_txn_status - TRUE if trx approved, FALSE otherwise
180  |
181  |   Returns
182  |        TRUE if successful, FALSE otherwise
183  |
184  |   Notes
185  |
186  |   History
187  |        05-NOV-1997           LSON              Created
188  |
189  + -------------------------------------------------------------------- */
190 
191 FUNCTION faxcds(X_book        IN  VARCHAR2,
192                 X_submit      IN  BOOLEAN,
193                 X_asset_id    IN  NUMBER,
194                 X_trx_type    IN  VARCHAR2,
195                 X_txn_status  IN OUT NOCOPY BOOLEAN,
196 		p_log_level_rec            IN  FA_API_TYPES.log_level_rec_type default null)
197          return BOOLEAN;
198 
199 
200 
201 /* ---------------------------------------------------------------------
202  |   Name
203  |        faxcms
204  |
205  |   Description
206  |        Checks the existance and status of any mass transactions running
207  |        against a book. If there are no uncompleted transactions, it will
208  |        return TRUE - meaning txns are allowed on this book. Otherwise
209  |        it displays message and passes the request_id back to the calling function.
210  |
211  |   Parameters
212  |        X_book  - book for which txn status is checked
213  |        X_request_id  - request_id to be returned to when that request
214  |                        is non-complete
215  |
216  |   Returns
217  |        TRUE if successful, FALSE otherwise
218  |
219  |   Notes
220  |
221  |   History
222  |        03-Feb-1997           LSON              Created
223  |
224  + -------------------------------------------------------------------- */
225 
226 FUNCTION faxcms(X_book         IN    VARCHAR2,
227                 X_request_id   OUT NOCOPY   NUMBER,
228 		p_log_level_rec            IN  FA_API_TYPES.log_level_rec_type default null)
229              return BOOLEAN;
230 
231 /* ---------------------------------------------------------------------
232  |   Name
233  |        faxcca
234  |
235  |   Description
236  |        Checks the existance and status of any Create Accounting
237  |        process running against a book. If there are no such requests,
238  |        it will return TRUE - meaning txns are allowed on this book. Otherwise
239  |        it displays message and passes the request_id back to the calling function.
240  |
241  |   Parameters
242  |        X_book  - book for which txn status is checked
243  |        X_request_id  - request_id to be returned to when that request
244  |                        is non-complete
245  |
246  |   Returns
247  |        TRUE if successful, FALSE otherwise
248  |
249  |   Notes
250  |
251  |   History
252  |        14-Aug-2006           BRIDGWAY          Created
253  |
254  + -------------------------------------------------------------------- */
255 
256 
257 FUNCTION faxcca(X_book         IN    VARCHAR2,
258                 X_request_id   OUT NOCOPY   NUMBER,
259 		p_log_level_rec IN  FA_API_TYPES.log_level_rec_type default null)
260          return BOOLEAN;
261 
262 
263 /* ---------------------------------------------------------------------
264  |   Name
265  |        faxwcr
266  |
267  |   Description
268  |        This function waits for concurrent request, caculates a concurrent
269  |        request re-start time and issues request to run it at that time.
270  |
271  |   Parameters
272  |        X_request_id  - request-id of the failed submission
273  |
274  |   Returns
275  |        TRUE if successful, FALSE otherwise
276  |
277  |   Notes
278  |        Funtion currently disabled, will return TRUE always
279  |
280  |   History
281  |        03-Feb-1997           LSON              Created
282  |
283  + -------------------------------------------------------------------- */
284 
285 FUNCTION faxwcr(X_request_id    IN  NUMBER,
286                 p_log_level_rec            IN  FA_API_TYPES.log_level_rec_type default null)
287              return BOOLEAN;
288 
289 
290 
291 /* ---------------------------------------------------------------------
292  |   Name
293  |        faxptb
294  |
295  |   Description
296  |
297  |      Checks the status of any processes on the TAX books.
298  |        For each Tax book of the associated CORP book
299  |        it calls faxcps to check its status.
300  |        If any one of them has process of running,pending,inactive
301  |        all the lock will be rolled back and txn is disallowed.
302  |
303  |   Parameters
304  |        X_book  - book_type_code for which status is checked
305  |        X_start - TRUE if mass trx should be resubmitted.
306  |        X_asset_id - 0 for mass trx, other for individual txns
307  |        X_trx_type - transaction type code of transaction
308  |        X_txn_status - TRUE if txn allowed, FALSE otherwise
309  |
310  |   Returns
311  |        TRUE if successful, FALSE otherwise
312  |
313  |   Notes
314  |
315  |   History
316  |        03-Feb-1997           LSON              Created
317  |
318  + -------------------------------------------------------------------- */
319 
320 
321 FUNCTION faxptb(X_book       IN     VARCHAR2,
322                 X_start      IN     BOOLEAN,
323                 X_asset_id   IN     NUMBER,
324                 X_trx_type   IN     VARCHAR2,
325                 X_txn_status     IN OUT NOCOPY    BOOLEAN,
326 		p_log_level_rec  IN  FA_API_TYPES.log_level_rec_type default null)
327         return BOOLEAN;
328 
329 
330 
331 /* ---------------------------------------------------------------------
332  |   Name
333  |        faxgcb
334  |
335  |   Description
336  |
337  |        Get associated corporate book for tax book passed in.
338  |        Calls faxcms to check to see if any mass processes running
339  |        on the corp book is mass transfer or mass additions post.
340  |        If so, disallow txns.
341  |
342  |   Parameters
343  |        X_book  - book_type_code for TAX book
344  |        X_txn_status - TRUE, if txns is allowed.
345  |
346  |   Returns
347  |        TRUE if successful, FALSE otherwise
348  |
349  |   Notes
350  |
351  |   History
352  |        03-Feb-1997           LSON              Created
353  |
354  + -------------------------------------------------------------------- */
355 
356 FUNCTION faxgcb(X_book         IN    VARCHAR2,
357                 X_txn_status       IN OUT NOCOPY   BOOLEAN,
358 		p_log_level_rec    IN  FA_API_TYPES.log_level_rec_type default null)
359 
360              return BOOLEAN;
361 
362 
363 
364 /* ---------------------------------------------------------------------
365  |   Name
366  |        faxlck
367  |
368  |   Description
369  |        This function locks fa_book_control row for a book passed in
370  |
371  |   Parameters
372  |        X_book  - book_type_code to lock
373  |                  If null, it will rollback to savepoint
374  |        X_txn_status  - TRUE if lock obtained
375  |
376  |   Returns
377  |        TRUE if successful, FALSE otherwise
378  |
379  |   Notes
380  |
381  |   History
382  |        03-Feb-1997           LSON              Created
383  |
384  + -------------------------------------------------------------------- */
385 
386 FUNCTION faxlck(X_book        IN  VARCHAR2,
387                 X_txn_status  IN OUT NOCOPY BOOLEAN,
388                 X_asset_id    IN NUMBER,
389                 X_trx_type    IN VARCHAR2,
390 		p_log_level_rec  IN  FA_API_TYPES.log_level_rec_type default null)
391              return BOOLEAN;
392 
393 
394 /* ---------------------------------------------------------------------
395  |   Name
396  |        faxsav
397  |
398  |   Description
399  |        This function create or rollback to a savepoint
400  |
401  |   Parameters
402  |        X_action  - R for rollback to a savepoint
403  |                    S for set savepoint
404  |                    C for clear savepoint indicator
405  |
406  |        X_txn_status  - TRUE if savepoint obtained
407  |
408  |   Returns
409  |        TRUE if successful, FALSE otherwise
410  |
411  |   Notes
412  |        savepoint_set is global variable indicating whether or not savepoint is set
413  |
414  |   History
415  |        03-Feb-1997           LSON              Created
416  |
417  + -------------------------------------------------------------------- */
418 
419 FUNCTION faxsav(X_action     IN  VARCHAR2,
420                 X_txn_status     IN OUT NOCOPY BOOLEAN,
421 		p_log_level_rec  IN  FA_API_TYPES.log_level_rec_type default null)
422      return BOOLEAN;
423 
424 /* ---------------------------------------------------------------------
425  |   Name
426  |        faxcdr
427  |
428  |   Description
429  |        This function checks if depreciation has been run for the
430  |        current open period for the book passed as parameter
431  |
432  |   Parameters
433  |        X_book     - book_type_code to check if depreciation has run
434  |        X_asset_id - asset_id (0 for mass requests)
435  |   Returns
436  |        TRUE if depreciation not run, FALSE otherwise
437  |
438  |   Notes
439  |
440  |   History
441  |        05-Nov-1998           SNARAYAN     Created
442  |        07-Aug-2001           BRIDGWAY     added asset_id param and
443  |
444  + -------------------------------------------------------------------- */
445 
446 FUNCTION faxcdr(
447                 X_book          IN      VARCHAR2,
448                 X_asset_id      IN      NUMBER DEFAULT 0,
449 		p_log_level_rec     IN  FA_API_TYPES.log_level_rec_type default null)
450      return BOOLEAN;
451 
452 
453 END FA_CHK_BOOKSTS_PKG;