1 PACKAGE FA_ASSET_SUMM_RPT_PKG AUTHID CURRENT_USER AS
2 -- $Header: FASSUMRPTPS.pls 120.8.12020000.2 2012/08/16 14:52:33 deemitta ship $
3 /*===========================================================================+
4 --*************************************************************************
5 -- Copyright (c) 2000 Oracle Product Development
6 -- All rights reserved
7 --*************************************************************************
8 --
9 -- HEADER
10 -- Source control header
11 --
12 -- PROGRAM NAME
13 -- FASSUMRPTPS.pls
14 --
15 -- DESCRIPTION
16 -- This script creates the package specification of FA_ASSET_SUMM_RPT_PKG
17 -- This package is used for Asset Summary Report of Germany.
18 --
19 -- USAGE
20 -- To install sqlplus <apps_user>/<apps_pwd> @FASSUMRPTPS.pls
21 -- To execute sqlplus <apps_user>/<apps_pwd> FA_ASSET_SUMM_RPT_PKG.
22 --
23 -- PROGRAM LIST DESCRIPTION
24 --
25 -- BEFOREREPORT This function is used to dynamically get the
26 -- WHERE clause in SELECT statement.
27 --
28 --ADDITIONS_AMOUNT This function is used to obtain the Asset Additions
29 -- during the from and to period values
30 --RETIREMENT_AMOUNT This function is used to obtain the Retirement amount
31 -- of an asset that is retired during the period
32 --CHANGES_OF_ACCOUNTS This function obtains the amount that is changed from
33 -- one Code Combination to another by Transfer of Assets
34 -- or by the reclassification of assets
35 --CURRENT_AMOUNT This function is used to obtain the cost of an asset
36 -- which is created before the "from period"
37 --ACCM_DEPRN_AMT This function is used to calculate the Depreciation
38 -- reserve amount for an Asset uptil the End period.
39 --DEPRN_EXPENSE This function is used to calculate the Depreciation amount
40 -- during the from and to period values of an Asset
41 --ADJUSTMENT_AMOUNT This function is used to obtain the Cost adjustments of an
42 -- asset during the period
43 --ACCM_DEPRN_AMT_PR_YEAR This function is used to calculate the Depreciation reserve
44 -- of an asset prior to the from period of an asset
45 -- This is mainly used for calculating the Net Book Value of
46 -- an Asset
47 --
48 -- DEPENDENCIES
49 -- None
50 --
51 -- CALLED BY
52 -- Asset Summary Report (Germany).
53 --
54 -- LAST UPDATE DATE 26-Feb-2007
55 -- Date the program has been modified for the last time.
56 --
57 -- HISTORY
58 -- =======
59 --
60 -- VERSION DATE AUTHOR(S) DESCRIPTION
61 -- ------- ----------- --------------- --------------------------------------
62 -- Draft1A 26-Feb-2007 Sandeep Kumar G Initial Creation
63 -- Draft1B 15-Aug-2009 Rakesh Pulla Added the parameter p_fah_trx_header_id to meet
64 -- the requirement in the SR 7284007.992
65 +===========================================================================*/
66
67
68 /*=========================================
69 Variables to Hold the Parameter Values
70 =========================================*/
71 P_BOOK_NAME VARCHAR2(30);
72 P_BEGIN_PERIOD VARCHAR2(30);
73 P_END_PERIOD VARCHAR2(30);
74 P_ACCOUNT_DESC VARCHAR2(30);
75 P_FROM_CATEGORY VARCHAR2(70);
76 P_TO_CATEGORY VARCHAR2(70);
77 P_FROM_ACCOUNT VARCHAR2(30);
78 P_TO_ACCOUNT VARCHAR2(30);
79 P_ASSET_DETAILS VARCHAR2(30);
80
81 P_DIST_SOURCE_BOOK VARCHAR2(16);
82
83 /*=========================================
84 Lexical Variables to obtain dynamic values
85 =========================================*/
86
87 gn_lex_begin_period_counter NUMBER; -- Obtains the Period number for a beginning Period
88 gn_lex_end_period_counter NUMBER; -- Obtains the Period number for a ending Period
89 gc_acct_flex_struc NUMBER;
90 gc_cat_flex_struc NUMBER;
91
92 gd_period_close_date DATE; --posses the Close date of End period
93 gd_period_open_date DATE; --posses the Open date of Beginning period
94 gd_per_close_date DATE; --posses the Close date of End period
95 gd_per_open_date DATE; --posses the Open date of Beginning period
96
97 gc_book_class VARCHAR2(30);
98 gc_asset_details VARCHAR2(1) := 'N';
99
100
101 gc_category_where VARCHAR2(400);
102
103 gc_from_maj_seg VARCHAR2(100);
104 gc_from_min_seg VARCHAR2(100);
105 gc_to_maj_seg VARCHAR2(100);
106 gc_to_min_seg VARCHAR2(100);
107
108 gc_trx_sub_type VARCHAR2(100);
109
110 gc_ledger_name VARCHAR2(30);
111 gc_currency_code VARCHAR2(30);
112 /*=========================================
113 Public Functions
114 =========================================*/
115
116 FUNCTION ASSIGNED_UNITS(p_asset_id_in IN NUMBER
117 ,p_ccid_in IN NUMBER
118 ,p_transaction_units_in IN NUMBER
119 ,p_original_cost_in IN NUMBER
120 ,p_units_in IN NUMBER) RETURN NUMBER;
121
122 FUNCTION ADDITIONS_AMOUNT(p_transaction_header_id IN NUMBER
123 ,p_asset_id_in IN NUMBER
124 ,p_category_id_in IN NUMBER
125 ,p_asset_type_in IN VARCHAR2
126 ,p_ccid_in IN NUMBER
127 ,p_location_id_in IN NUMBER
128 ,p_fah_trx_header_id IN NUMBER) RETURN NUMBER;
129
130 FUNCTION RETIREMENT_AMOUNT(p_transaction_header_id IN NUMBER
131 ,p_asset_id_in IN NUMBER
132 ,p_category_id_in IN NUMBER
133 ,p_asset_type_in IN VARCHAR2
134 ,p_ccid_in IN NUMBER
135 ,p_location_id_in IN NUMBER) RETURN NUMBER;
136
137 FUNCTION CHANGES_OF_ACCOUNTS(p_transaction_header_id IN NUMBER
138 ,p_asset_id_in IN NUMBER
139 ,p_category_id_in IN NUMBER
140 ,p_asset_type_in IN VARCHAR2
141 ,p_ccid_in IN NUMBER
142 ,p_location_id_in IN NUMBER
143 ,p_fah_trx_header_id IN NUMBER) RETURN NUMBER;
144
145 FUNCTION CURRENT_AMOUNT(p_transaction_header_id IN NUMBER
146 ,p_asset_id_in IN NUMBER
147 ,p_category_id_in IN NUMBER
148 ,p_asset_type_in IN VARCHAR2
149 ,p_ccid_in IN NUMBER
150 ,p_location_id_in IN NUMBER) RETURN NUMBER;
151
152 FUNCTION CATEGORY_ACCM_DEPRN_AMT(p_transaction_header_id IN NUMBER
153 ,p_asset_id_in IN NUMBER
154 ,p_ccid_in IN NUMBER
155 ,p_location_id_in IN NUMBER) RETURN NUMBER;
156 FUNCTION ACCM_DEPRN_AMT(p_transaction_header_id IN NUMBER
157 ,p_asset_id_in IN NUMBER
158 ,p_ccid_in IN NUMBER
159 ,p_location_id_in IN NUMBER) RETURN NUMBER;
160
161 FUNCTION DEPRN_EXPENSE(p_transaction_header_id IN NUMBER
162 ,p_asset_id_in IN NUMBER
163 ,p_ccid_in IN NUMBER
164 ,p_location_id_in IN NUMBER) RETURN NUMBER;
165
166 FUNCTION ADJUSTMENT_AMOUNT(p_transaction_header_id IN NUMBER
167 ,p_asset_id_in IN NUMBER
168 ,p_category_id_in IN NUMBER
169 ,p_asset_type_in IN VARCHAR2
170 ,p_location_id_in IN NUMBER
171 ,p_ccid_in IN NUMBER) RETURN NUMBER;
172
173 FUNCTION APPRECIATION_AMOUNT(p_transaction_header_id IN NUMBER
174 ,p_asset_id_in IN NUMBER
175 ,p_category_id_in IN NUMBER
176 ,p_asset_type_in IN VARCHAR2
177 ,p_location_id_in IN NUMBER
178 ,p_ccid_in IN NUMBER) RETURN NUMBER;
179
180 FUNCTION ACCM_DEPRN_AMT_PR_YEAR(p_transaction_header_id IN NUMBER
181 ,p_asset_id_in IN NUMBER
182 ,p_ccid_in IN NUMBER
183 ,p_location_id_in IN NUMBER) RETURN NUMBER;
184
185 FUNCTION GAIN_LOSS_AMOUNT(p_transaction_header_id IN NUMBER
186 ,p_asset_id_in IN NUMBER
187 ,p_category_id_in IN NUMBER
188 ,p_asset_type_in IN VARCHAR2
189 ,p_ccid_in IN NUMBER
190 ,p_location_id_in IN NUMBER) RETURN NUMBER;
191
192 FUNCTION beforereport RETURN BOOLEAN;
193
194 END FA_ASSET_SUMM_RPT_PKG;