DBA Data[Home] [Help]

PACKAGE: APPS.FA_WHATIF_DEPRN2_PKG

Source


1 PACKAGE FA_WHATIF_DEPRN2_PKG as
2 /* $Header: FAWDPR2S.pls 120.4.12010000.1 2008/07/28 13:19:27 appldev ship $ */
3 
4 
5 
6 -- function whatif_deprn
7 
8 -- Perform whatif deprn on a set of assets given hypothetical properties.
9 -- Commit results to FA_WHATIF_DEP.
10 -- This should be only called from within a concurrent request.
11 --
12 -- X_exp_amt is either 'E' or 'A'.
13 -- If 'E', then for each asset:
14 --	Run whatif_deprn_asset in 'E' mode.
15 --	Run whatif_deprn_asset in 'N' mode.
16 --	Run whatif_insert_itf, and commit.
17 -- If 'A', then for each asset:
18 --	Run whatif_deprn_asset in 'A' mode.
19 --	Run whatif_deprn_asset in 'N' mode.
20 --	Run whatif_insert_itf, and commit.
21 
22 
23 function whatif_deprn (
24 	X_assets	in out nocopy fa_std_types.number_tbl_type,
25 	X_num_assets	in number,
26 	X_method	in varchar2,
27 	X_life		in number,
28 	X_adjusted_rate in number,
29 	X_prorate_conv	in varchar2,
30 	X_salvage_pct	in number,
31 	X_exp_amt	in out nocopy varchar2,
32 	X_book		in varchar2,
33 	X_start_per	in varchar2,
34 	X_num_per	in number,
35 	X_request_id	in number,
36 	X_user_id	in number,
37 	X_hypo          in varchar2,
38 	X_dpis          in date,
39 	X_cost          in number,
40 	X_deprn_rsv     in number,
41         X_cat_id        in number,
42 	X_bonus_rule	in varchar2,
43 	retcode	 out nocopy number,
44 	errbuf	 out nocopy varchar2)
45 return boolean;
46 
47 
48 -- function whatif_get_assets
49 
50 -- Get set of assets satisfying criteria:
51 --   Book
52 --   Asset number range
53 --   DPIS range
54 --   Description
55 --   Category
56 -- If any of these are null, this means it's not used as a criterion.
57 -- Also, assets not included if:
58 --   1. non-expense adjustment already occurred for this asset.
59 --   2. there exist transactions dated after sysdate.
60 --   3. non-production <=> production method changes aren't legal
61 --	(X_method param is needed to check this)
62 -- Put asset_id's satisfying criteria AND don't have conditions 1,2,3
63 -- in X_good_assets array.
64 
65 function whatif_get_assets (
66 	X_book		in varchar2,
67 	X_begin_asset	in varchar2,
68 	X_end_asset	in varchar2,
69 	X_begin_dpis	in date,
70 	X_end_dpis	in date,
71 	X_description   in varchar2,
72 	X_category_id	in number,
73 	X_mode		in varchar2,
74 	X_rsv_flag      in varchar2,
75 	X_good_assets out nocopy fa_std_types.number_tbl_type,
76 	X_num_good out nocopy number,
77 	retcode	 out nocopy number,
78 	errbuf	 out nocopy varchar2)
79 return boolean;
80 
81 
82 END FA_WHATIF_DEPRN2_PKG;