1 PACKAGE XTR_REPLICATE_BANK_ACCOUNTS_P AS
2 /* | $Header: xtrrbacs.pls 120.1 2005/06/30 12:52:14 badiredd noship $ | */
3
4 /* This package is used to replicate the Internal Bank accounts created in CE into XTR tables.
5 */
6
7 /**
8 * PROCEDURE replicate_bank_accounts
9 *
10 * DESCRIPTION
11 * This is the main procedure that is called by CE to replicate the
12 * Bank/Bank Branch and Bank account data created in CE into XTR tables.
13 *
14 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
15 *
16 * ARGUMENTS
17 * IN:
18 * p_xtr_bank_account_rec Record type of XTR_BANK_ACCOUNTS
19 * This record type contains the Bank Account
20 * related information.
21 * p_action_flag Indicates wether Bank account information needs
22 * to be inserted or updated.
23 * 'I' - Insert,'U' - Update
24 * IN/OUT:
25 *
26 * OUT:
27 * x_return_status Return status after the call. The
28 * status can be
29 * FND_API.G_RET_STS_SUCCESS - for success
30 * FND_API.G_RET_STS_ERR - for expected error
31 * FND_API.G_RET_STS_UNEXP_ERR - for unexpected error
32 * x_msg_count To return the number of error messages
33 * in stack
34 * x_msg_data To return the error message if
35 * x_msg_count = 1.
36 * NOTES
37 *
38 * MODIFICATION HISTORY
39 *
40 * 05-19-2005 Bhargav Adireddy o Created.
41 *
42 */
43
44
45 PROCEDURE REPLICATE_BANK_ACCOUNTS
46 (p_xtr_bank_account_rec IN XTR_BANK_ACCOUNTS%ROWTYPE,
47 p_action_flag IN VARCHAR2,
48 x_return_status OUT NOCOPY VARCHAR2,
49 x_msg_count OUT NOCOPY NUMBER,
50 x_msg_data OUT NOCOPY VARCHAR2
51 );
52
53
54 PROCEDURE REPLICATE_BANK_ACCOUNTS
55 (p_account_number IN XTR_BANK_ACCOUNTS.account_number%TYPE,
56 p_authorised IN XTR_BANK_ACCOUNTS.authorised%TYPE,
57 p_party_code IN XTR_BANK_ACCOUNTS.party_code%TYPE,
58 p_party_type IN XTR_BANK_ACCOUNTS.party_type%TYPE,
59 p_bank_code IN XTR_BANK_ACCOUNTS.bank_code%TYPE,
60 p_currency IN XTR_BANK_ACCOUNTS.currency%TYPE,
61 p_bank_short_code IN XTR_BANK_ACCOUNTS.bank_short_code%TYPE,
62 p_default_acct IN XTR_BANK_ACCOUNTS.default_acct%TYPE,
63 p_eft_script_name IN XTR_BANK_ACCOUNTS.eft_script_name%TYPE,
64 p_code_combination_id IN XTR_BANK_ACCOUNTS.code_combination_id%TYPE,
65 p_interest_calculation_basis IN XTR_BANK_ACCOUNTS.interest_calculation_basis%TYPE,
66 p_location IN XTR_BANK_ACCOUNTS.location%TYPE,
67 p_portfolio_code IN XTR_BANK_ACCOUNTS.portfolio_code%TYPE,
68 p_primary_settlement_method IN XTR_BANK_ACCOUNTS.primary_settlement_method%TYPE,
69 p_street IN XTR_BANK_ACCOUNTS.street%TYPE,
70 p_year_calc_type IN XTR_BANK_ACCOUNTS.year_calc_type%TYPE,
71 p_swift_id IN XTR_BANK_ACCOUNTS.swift_id%TYPE,
72 p_attribute_category IN XTR_BANK_ACCOUNTS.attribute_category%TYPE,
73 p_attribute1 IN XTR_BANK_ACCOUNTS.attribute1%TYPE,
74 p_attribute2 IN XTR_BANK_ACCOUNTS.attribute2%TYPE,
75 p_attribute3 IN XTR_BANK_ACCOUNTS.attribute3%TYPE,
76 p_attribute4 IN XTR_BANK_ACCOUNTS.attribute4%TYPE,
77 p_attribute5 IN XTR_BANK_ACCOUNTS.attribute5%TYPE,
78 p_attribute6 IN XTR_BANK_ACCOUNTS.attribute6%TYPE,
79 p_attribute7 IN XTR_BANK_ACCOUNTS.attribute7%TYPE,
80 p_attribute8 IN XTR_BANK_ACCOUNTS.attribute8%TYPE,
81 p_attribute9 IN XTR_BANK_ACCOUNTS.attribute9%TYPE,
82 p_attribute10 IN XTR_BANK_ACCOUNTS.attribute10%TYPE,
83 p_attribute11 IN XTR_BANK_ACCOUNTS.attribute11%TYPE,
84 p_attribute12 IN XTR_BANK_ACCOUNTS.attribute12%TYPE,
85 p_attribute13 IN XTR_BANK_ACCOUNTS.attribute13%TYPE,
86 p_attribute14 IN XTR_BANK_ACCOUNTS.attribute14%TYPE,
87 p_attribute15 IN XTR_BANK_ACCOUNTS.attribute15%TYPE,
88 p_pricing_model IN XTR_BANK_ACCOUNTS.pricing_model%TYPE,
89 p_legal_account_name IN XTR_BANK_ACCOUNTS.legal_account_name%TYPE,
90 p_ce_bank_account_id IN XTR_BANK_ACCOUNTS.ce_bank_account_id%TYPE,
91 p_bank_branch_id IN XTR_BANK_ACCOUNTS.bank_branch_id%TYPE,
92 p_bank_acct_use_id IN XTR_BANK_ACCOUNTS.bank_acct_use_id%TYPE,
93 p_action_flag IN VARCHAR2,
94 x_return_status OUT NOCOPY VARCHAR2,
95 x_msg_count OUT NOCOPY NUMBER,
96 x_msg_data OUT NOCOPY VARCHAR2
97 );
98
99 /**
100 * PROCEDURE insert_bank_accounts
101 *
102 * DESCRIPTION
103 * This procedure is called in replicate_bank_accounts to insert
104 * the bank account related data into XTR tables. This procedure is
105 * called when p_action_flag = 'I'
106 *
107 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
108 *
109 * ARGUMENTS
110 * IN:
111 * p_xtr_bank_account_rec Record type of XTR_BANK_ACCOUNTS
112 * This record type contains the Bank Account
113 * related information.
114 * IN/OUT:
115 *
116 * OUT:
117 * x_return_status Return status after the call. The
118 * status can be
119 * FND_API.G_RET_STS_SUCCESS - for success
120 * FND_API.G_RET_STS_ERR - for expected error
121 * FND_API.G_RET_STS_UNEXP_ERR - for unexpected error
122 * NOTES
123 *
124 * MODIFICATION HISTORY
125 *
126 * 05-19-2005 Bhargav Adireddy o Created.
127 *
128 */
129 PROCEDURE INSERT_BANK_ACCOUNTS
130 ( p_xtr_bank_account_rec IN XTR_BANK_ACCOUNTS%ROWTYPE,
131 x_return_status OUT NOCOPY VARCHAR2
132 );
133
134 /**
135 * PROCEDURE update_bank_accounts
136 *
137 * DESCRIPTION
138 * This procedure is called in replicate_bank_accounts to update
139 * the bank account related data into XTR tables. This procedure is
140 * called when p_action_flag = 'I'
141 *
142 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
143 *
144 * ARGUMENTS
145 * IN:
146 *
147 * p_xtr_bank_account_rec Record type of XTR_BANK_ACCOUNTS
148 * This record type contains the Bank Account
149 * related information.
150 * IN/OUT:
151 *
152 * OUT:
153 * x_return_status Return status after the call. The
154 * status can be
155 * FND_API.G_RET_STS_SUCCESS - for success
156 * FND_API.G_RET_STS_ERR - for expected error
157 * FND_API.G_RET_STS_UNEXP_ERR - for unexpected error
158 * NOTES
159 *
160 * MODIFICATION HISTORY
161 *
162 * 05-19-2005 Bhargav Adireddy o Created.
163 *
164 */
165
166 PROCEDURE UPDATE_BANK_ACCOUNTS
167 ( p_xtr_bank_account_rec IN XTR_BANK_ACCOUNTS%ROWTYPE,
168 x_return_status OUT NOCOPY VARCHAR2
169 );
170
171
172 /**
173 * PROCEDURE validate_bank_accounts
174 *
175 * This procedure is used to validate the Bank account related data before
176 * it is inserted/updated into XTR_BANK_ACCOUNTS. This procedure will
177 * perform the required validations and puts the corresponding error
178 * messages into list
179 *
180 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
181 *
182 * ARGUMENTS
183 * IN:
184 * p_xtr_bank_account_rec Record type of XTR_BANK_ACCOUNTS
185 * This record type contains the Bank Account
186 * related information.
187 * IN/OUT:
188 *
189 * OUT:
190 * x_return_status Return status after the call. The
191 * status can be
192 * FND_API.G_RET_STS_SUCCESS - for success
193 * FND_API.G_RET_STS_ERR - for expected error
194 * FND_API.G_RET_STS_UNEXP_ERR - for unexpected error
195 * NOTES
196 *
197 * MODIFICATION HISTORY
198 *
199 * 05-19-2005 Bhargav Adireddy o Created.
200 *
201 */
202
203
204 PROCEDURE VALIDATE_BANK_ACCOUNTS
205 ( p_xtr_bank_account_rec IN XTR_BANK_ACCOUNTS%ROWTYPE,
206 x_return_status IN OUT NOCOPY VARCHAR2
207 );
208
209 /**
210 * PROCEDURE modify_bank_accounts
211 *
212 * DESCRIPTION
213 * This procedure will insert/update XTR_BANK_ACCOUNTS table with the
214 * Bank account data passed form CE. It will insert if p_action_flag = 'I'
215 * and update if p_action_flag = 'U'
216 *
217 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
218 *
219 * ARGUMENTS
220 * IN:
221 * p_xtr_bank_account_rec Record type of XTR_BANK_ACCOUNTS
222 * This record type contains the Bank Account
223 * p_action_flag Indicates wether Bank account information needs
224 * to be inserted or updated.
225 * 'I' - Insert,'U' - Update related information.
226 * IN/OUT:
227 *
228 * OUT:
229 * x_return_status Return status after the call. The
230 * status can be
231 * FND_API.G_RET_STS_SUCCESS - for success
232 * FND_API.G_RET_STS_ERR - for expected error
233 * FND_API.G_RET_STS_UNEXP_ERR - for unexpected error
234 * NOTES
235 *
236 * MODIFICATION HISTORY
237 *
238 * 05-19-2005 Bhargav Adireddy o Created.
239 *
240 */
241
242
243 PROCEDURE MODIFY_BANK_ACCOUNTS
244 ( p_xtr_bank_account_rec IN XTR_BANK_ACCOUNTS%ROWTYPE,
245 p_action_flag IN VARCHAR2,
246 x_return_status IN OUT NOCOPY VARCHAR2
247 );
248 /**
249 * PROCEDURE log_err_msg
250 *
251 * DESCRIPTION
252 * This procedure will attach the tokens with the error messages and puts
253 * all the error messages into a list. CE can extract the error messages
254 * from this list and show them to the user.
255 *
256 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
257 *
258 * ARGUMENTS
259 * IN:
260 * p_error_code This will pass the message_name
261 * which has to be put into the list.
262 * p_field_name This will pass the token which has to be
263 * attached with the error message.
264 * IN/OUT:
265 *
266 * OUT:
267 *
268 * NOTES
269 *
270 * MODIFICATION HISTORY
271 *
272 * 05-19-2005 Bhargav Adireddy o Created.
273 *
274 */
275 PROCEDURE LOG_ERR_MSG
276 ( p_error_code IN VARCHAR2,
277 p_field_name IN VARCHAR2 default null,
278 p_field_name2 IN VARCHAR2 default null
279 );
280
281 /**
282 * PROCEDURE replicate_interest_schedules
283 *
284 * DESCRIPTION
285 * This is the main procedure that is called by CE to replicate the
286 * interest schedules data created in CE into XTR tables.
287 *
288 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
289 *
290 * ARGUMENTS
291 * IN:
292 * p_ce_bank_account_id This is the CE_BANK_ACCOUNT_ID in XTR_PARTY_INFO.
293 * CE will pass this parameter. This will tell us
294 * which Bank Account is attached with the interest
295 * schedule being updated.
296 * p_interest_rounding This is the ROUNDING_TYPE in XTR_BANK_ACCOUNTS.
297 * CE will pass this parameter. This will tell us
298 * what is the updated interest rounding.
299 * p_interest_includes This is the DAY_COUNT_TYPE in XTR_BANK_ACCOUNTS.
300 * CE will pass this parameter. This will tell us
301 * what is the updated Interest Includes.
302 * p_interest_calculation
303 * _basis This is the BASIS in XTR_BANK_ACCOUNTS.
304 * CE will pass this parameter. This will tell us
305 * what is the updated BASIS.
306 * p_day_count_basis This is the DAY_COUNT_BASIS in XTR_BANK_ACCOUNTS.
307 * CE will pass this parameter. This will tell us
308 * what is the updated day count basis.
309 * IN/OUT:
310 *
311 * OUT:
312 * x_return_status Return status after the call. The
313 * status can be
314 * FND_API.G_RET_STS_SUCCESS - for success
315 * FND_API.G_RET_STS_ERR - for expected error
316 * FND_API.G_RET_STS_UNEXP_ERR - for unexpected error
317 * x_msg_count To return the number of error messages
318 * in stack
319 * x_msg_data To return the error message if
320 * x_msg_count = 1.
321 * NOTES
322 *
323 * MODIFICATION HISTORY
324 *
325 * 05-19-2005 Bhargav Adireddy o Created.
326 *
327 */
328
329
330 PROCEDURE REPLICATE_INTEREST_SCHEDULES
331 ( p_ce_bank_account_id IN XTR_BANK_ACCOUNTS.ce_bank_account_id%TYPE,--Chnage this to bank_account_id
332 p_interest_rounding IN XTR_BANK_ACCOUNTS.ROUNDING_TYPE%TYPE,
333 p_interest_includes IN XTR_BANK_ACCOUNTS.DAY_COUNT_TYPE%TYPE,
334 p_interest_calculation_basis IN XTR_BANK_ACCOUNTS.INTEREST_CALCULATION_BASIS%TYPE,
335 p_day_count_basis IN XTR_BANK_ACCOUNTS.YEAR_CALC_TYPE%TYPE,
336 x_return_status OUT NOCOPY VARCHAR2,
337 x_msg_count OUT NOCOPY NUMBER,
338 x_msg_data OUT NOCOPY VARCHAR2
339 );
340
341
342 END XTR_REPLICATE_BANK_ACCOUNTS_P; -- Package spec
343