[Home] [Help]
PACKAGE: APPS.GL_LEDGERS_PKG
Source
1 PACKAGE GL_LEDGERS_PKG AS
2 /* $Header: glistlds.pls 120.37.12010000.2 2008/11/26 04:10:39 phmullap ship $ */
3
4 -- **********************************************************************
5
6 --
7 -- Procedure
8 -- complete_config
9 -- Purpose
10 -- Called from OA FWK ledger configuration page to submit concurrent program
11 -- History
12 -- June 26, 2003 Alan Wen Copied from temporary pkg gl_ledger_pkg1
13 -- Arguments
14 -- X_CONFIG_ID configuration ID
15 -- Example
16 --
17 -- Notes
18 --
19
20 FUNCTION complete_config(x_config_id NUMBER)
21 RETURN VARCHAR2;
22 --
23 -- Procedure
24 -- insert_row
25 -- Purpose
26 -- Called from OA FWK ledger page to create ledger
27 -- History
28 -- June 26, 2003 Alan Wen Copied from temporary pkg gl_ledger_pkg1
29 -- July 09, 2003 Alan Wen Applied OA FWKstandard for handling PL/SQL errors
30 --
31 -- Arguments
32 --
33 -- Example
34 --
35 -- Notes
36 -- This procedure overload the update_row in this package.
37 -- After the Ledger Form is remvoed, the other one will be removed
38
39
40 PROCEDURE insert_row(
41 p_api_version IN NUMBER := 1.0,
42 p_init_msg_list IN VARCHAR2
43 := fnd_api.g_false,
44 p_commit IN VARCHAR2
45 := fnd_api.g_false,
46 p_validate_only IN VARCHAR2
47 := fnd_api.g_true,
48 p_record_version_number IN NUMBER := NULL,
49 x_return_status OUT NOCOPY VARCHAR2,
50 x_msg_count OUT NOCOPY NUMBER,
51 x_msg_data OUT NOCOPY VARCHAR2,
52 x_rowid IN OUT NOCOPY VARCHAR2,
53 x_ledger_id NUMBER,
54 x_name VARCHAR2,
55 x_short_name VARCHAR2,
56 x_chart_of_accounts_id NUMBER,
57 x_currency_code VARCHAR2,
58 x_period_set_name VARCHAR2,
59 x_accounted_period_type VARCHAR2,
60 x_first_ledger_period_name VARCHAR2,
61 x_ret_earn_code_combination_id NUMBER,
62 x_suspense_allowed_flag VARCHAR2,
63 x_suspense_ccid NUMBER,
64 x_allow_intercompany_post_flag VARCHAR2,
65 x_enable_avgbal_flag VARCHAR2,
66 x_enable_budgetary_control_f VARCHAR2,
67 x_require_budget_journals_flag VARCHAR2,
68 x_enable_je_approval_flag VARCHAR2,
69 x_enable_automatic_tax_flag VARCHAR2,
70 x_consolidation_ledger_flag VARCHAR2,
71 x_translate_eod_flag VARCHAR2,
72 x_translate_qatd_flag VARCHAR2,
73 x_translate_yatd_flag VARCHAR2,
74 x_automatically_created_flag VARCHAR2,
75 x_track_rounding_imbalance_f VARCHAR2,
76 -- x_mrc_ledger_type_code VARCHAR2,
77 x_le_ledger_type_code VARCHAR2,
78 x_bal_seg_value_option_code VARCHAR2,
79 x_mgt_seg_value_option_code VARCHAR2,
80 x_last_update_date DATE,
81 x_last_updated_by NUMBER,
82 x_creation_date DATE,
83 x_created_by NUMBER,
84 x_last_update_login NUMBER,
85 x_description VARCHAR2,
86 x_future_enterable_periods_lmt NUMBER,
87 x_latest_opened_period_name VARCHAR2,
88 x_latest_encumbrance_year NUMBER,
89 x_cum_trans_ccid NUMBER,
90 x_res_encumb_ccid NUMBER,
91 x_net_income_ccid NUMBER,
92 x_balancing_segment VARCHAR2,
93 x_rounding_ccid NUMBER,
94 x_transaction_calendar_id NUMBER,
95 x_daily_translation_rate_type VARCHAR2,
96 x_period_average_rate_type VARCHAR2,
97 x_period_end_rate_type VARCHAR2,
98 x_context VARCHAR2,
99 x_attribute1 VARCHAR2,
100 x_attribute2 VARCHAR2,
101 x_attribute3 VARCHAR2,
102 x_attribute4 VARCHAR2,
103 x_attribute5 VARCHAR2,
104 x_attribute6 VARCHAR2,
105 x_attribute7 VARCHAR2,
106 x_attribute8 VARCHAR2,
107 x_attribute9 VARCHAR2,
108 x_attribute10 VARCHAR2,
109 x_attribute11 VARCHAR2,
110 x_attribute12 VARCHAR2,
111 x_attribute13 VARCHAR2,
112 x_attribute14 VARCHAR2,
113 x_attribute15 VARCHAR2,
114 x_set_manual_flag VARCHAR2,
115 --x_child_ledger_access_code VARCHAR2,
116 x_ledger_category_code VARCHAR2,
117 x_configuration_id NUMBER,
118 x_sla_accounting_method_code VARCHAR2,
119 x_sla_accounting_method_type VARCHAR2,
120 x_sla_description_language VARCHAR2,
121 x_sla_entered_cur_bal_sus_ccid NUMBER,
122 x_sla_bal_by_ledger_curr_flag VARCHAR2,
123 x_sla_ledger_cur_bal_sus_ccid NUMBER,
124 x_alc_ledger_type_code VARCHAR2,
125 x_criteria_set_id NUMBER,
126 x_enable_secondary_track_flag VARCHAR2 DEFAULT 'N',
127 x_enable_reval_ss_track_flag VARCHAR2 DEFAULT 'N',
128 x_enable_reconciliation_flag VARCHAR2 DEFAULT 'N',
129 x_sla_ledger_cash_basis_flag VARCHAR2 DEFAULT 'N',
130 x_create_je_flag VARCHAR2 DEFAULT 'Y',
131 x_commitment_budget_flag VARCHAR2 DEFAULT NULL);
132
133 -- *********************************************************************
134
135 --
136 -- Procedure
137 -- update_row
138 -- Purpose
139 -- Called from OA FWK ledger page to update ledger definition
140 -- History
141 -- June 26, 2003 Alan Wen Copied from temporary pkg gl_ledger_pkg1
142 -- July 09, 2003 Alan Wen Applied OA FWKstandard for handling PL/SQL errors
143 --
144 -- Arguments
145 --
146 -- Example
147 --
148 -- Notes
149 -- This procedure overload the update_row in this package.
150 -- After the Ledger Form is remvoed, the other one will be removed
151
152 PROCEDURE update_row(
153 p_api_version IN NUMBER := 1.0,
154 p_init_msg_list IN VARCHAR2
155 := fnd_api.g_false,
156 p_commit IN VARCHAR2
157 := fnd_api.g_false,
158 p_validate_only IN VARCHAR2
159 := fnd_api.g_true,
160 p_record_version_number IN NUMBER := NULL,
161 x_return_status OUT NOCOPY VARCHAR2,
162 x_msg_count OUT NOCOPY NUMBER,
163 x_msg_data OUT NOCOPY VARCHAR2,
164 x_rowid VARCHAR2,
165 x_ledger_id NUMBER,
166 x_name VARCHAR2,
167 x_short_name VARCHAR2,
168 x_chart_of_accounts_id NUMBER,
169 x_currency_code VARCHAR2,
170 x_period_set_name VARCHAR2,
171 x_accounted_period_type VARCHAR2,
172 x_first_ledger_period_name VARCHAR2,
173 x_ret_earn_code_combination_id NUMBER,
174 x_suspense_allowed_flag VARCHAR2,
175 x_suspense_ccid NUMBER,
176 x_allow_intercompany_post_flag VARCHAR2,
177 x_enable_avgbal_flag VARCHAR2,
178 x_enable_budgetary_control_f VARCHAR2,
179 x_require_budget_journals_flag VARCHAR2,
180 x_enable_je_approval_flag VARCHAR2,
181 x_enable_automatic_tax_flag VARCHAR2,
182 x_consolidation_ledger_flag VARCHAR2,
183 x_translate_eod_flag VARCHAR2,
184 x_translate_qatd_flag VARCHAR2,
185 x_translate_yatd_flag VARCHAR2,
186 x_automatically_created_flag VARCHAR2,
187 x_track_rounding_imbalance_f VARCHAR2,
188 -- x_mrc_ledger_type_code VARCHAR2,
189 x_le_ledger_type_code VARCHAR2,
190 x_bal_seg_value_option_code VARCHAR2,
191 -- x_bal_seg_column_name VARCHAR2,
192 -- x_bal_seg_value_set_id NUMBER,
193 x_mgt_seg_value_option_code VARCHAR2,
194 -- x_mgt_seg_column_name VARCHAR2,
195 -- x_mgt_seg_value_set_id NUMBER,
196 x_implicit_access_set_id NUMBER,
197 x_last_update_date DATE,
198 x_last_updated_by NUMBER,
199 x_last_update_login NUMBER,
200 x_description VARCHAR2,
201 x_future_enterable_periods_lmt NUMBER,
202 x_latest_opened_period_name VARCHAR2,
203 x_latest_encumbrance_year NUMBER,
204 x_cum_trans_ccid NUMBER,
205 x_res_encumb_ccid NUMBER,
206 x_net_income_ccid NUMBER,
207 x_balancing_segment VARCHAR2,
208 x_rounding_ccid NUMBER,
209 x_transaction_calendar_id NUMBER,
210 x_daily_translation_rate_type VARCHAR2,
211 x_period_average_rate_type VARCHAR2,
212 x_period_end_rate_type VARCHAR2,
213 x_context VARCHAR2,
214 x_attribute1 VARCHAR2,
215 x_attribute2 VARCHAR2,
216 x_attribute3 VARCHAR2,
217 x_attribute4 VARCHAR2,
218 x_attribute5 VARCHAR2,
219 x_attribute6 VARCHAR2,
220 x_attribute7 VARCHAR2,
221 x_attribute8 VARCHAR2,
222 x_attribute9 VARCHAR2,
223 x_attribute10 VARCHAR2,
224 x_attribute11 VARCHAR2,
225 x_attribute12 VARCHAR2,
226 x_attribute13 VARCHAR2,
227 x_attribute14 VARCHAR2,
228 x_attribute15 VARCHAR2,
229 x_set_manual_flag VARCHAR2,
230 --x_child_ledger_access_code VARCHAR2,
231 x_ledger_category_code VARCHAR2,
232 x_configuration_id NUMBER,
233 x_sla_accounting_method_code VARCHAR2,
234 x_sla_accounting_method_type VARCHAR2,
235 x_sla_description_language VARCHAR2,
236 x_sla_entered_cur_bal_sus_ccid NUMBER,
237 x_sla_bal_by_ledger_curr_flag VARCHAR2,
238 x_sla_ledger_cur_bal_sus_ccid NUMBER,
239 x_alc_ledger_type_code VARCHAR2,
240 x_criteria_set_id NUMBER,
241 x_enable_secondary_track_flag VARCHAR2 DEFAULT 'N',
242 x_enable_reval_ss_track_flag VARCHAR2 DEFAULT 'N',
243 x_enable_reconciliation_flag VARCHAR2 DEFAULT 'N',
244 x_sla_ledger_cash_basis_flag VARCHAR2 DEFAULT 'N',
245 x_create_je_flag VARCHAR2 DEFAULT 'Y',
246 x_commitment_budget_flag VARCHAR2 DEFAULT NULL);
247 --
248 -- Procedure
249 -- check_unique_name
250 -- Purpose
251 -- Ensure new ledger name is unique among ledgers, ledger sets, and
252 -- access sets.
253 -- History
254 -- 02/08/01 O Monnier Created
255 -- Arguments
256 -- x_rowid The ID of the row to be checked
257 -- x_name The category name to be checked
258 -- Example
259 -- GL_LEDGERS_PKG.check_unique_name( '12345', 'LEDGER 1' );
260 -- Notes
261 --
262 PROCEDURE check_unique_name(x_rowid VARCHAR2, x_name VARCHAR2);
263 --
264 -- Procedure
265 -- check_unique_short_name
266 -- Purpose
267 -- Ensure new ledger short name is unique among ledgers and ledger sets.
268 -- History
269 -- 02/08/01 O Monnier Created
270 -- Arguments
271 -- x_rowid The ID of the row to be checked
272 -- x_short_name The short name to be checked
273 -- Example
274 -- GL_LEDGERS_PKG.check_unique_short_name( '12345', 'LEDGER 1' );
275 -- Notes
276 --
277 PROCEDURE check_unique_short_name(x_rowid VARCHAR2, x_short_name VARCHAR2);
278 --
279 -- Procedure
280 -- get_unique_id
281 -- Purpose
282 -- Gets a new sequence unique id for a new ledger.
283 -- History
284 -- 02/08/01 O Monnier Created from old sets of books package.
285 -- Arguments
286 -- none
287 -- Example
288 -- :ledger.ledger_id := GL_LEDGERS_PKG.get_unique_id;
289 -- Notes
290 --
291 FUNCTION get_unique_id
292 RETURN NUMBER;
293 --
294 -- Procedure
295 -- is_coa_frozen
296 -- Purpose
297 -- Test if the Chart of Accounts selected is frozen.
298 -- History
299 -- 02/08/01 O Monnier Created
300 -- Arguments
301 -- X_Chart_Of_Accounts_Id Key Flexfield Structure Num
302 -- Example
303 -- test := GL_LEDGERS_PKG.is_coa_frozen ( 101 );
304 -- Notes
305 --
309 -- Procedure
306 FUNCTION is_coa_frozen(x_chart_of_accounts_id NUMBER)
307 RETURN BOOLEAN;
308 --
310 -- get_bal_mgt_seg_info
311 -- Purpose
312 -- Gets the balancing segment column name, value set id,
313 -- the management segment column name, and value set id for the Chart of Accounts.
314 -- History
315 -- 02/08/01 O Monnier Created
316 -- Arguments
317 -- X_Bal_Seg_Column_Name Retrieve the balancing segment column name
318 -- X_Bal_Seg_Value_Set_Id Retrieve the balancing segment value set id
319 -- X_Mgt_Seg_Column_Name Retrieve the balancing segment column name
320 -- X_Mgt_Seg_Value_Set_Id Retrieve the balancing segment value set id
321 -- X_Chart_Of_Accounts_Id Key Flexfield Structure Num
322 -- Example
323 -- GL_LEDGERS_PKG.get_bal_seg_info(X_Bal_Seg_Column_Name,
324 -- X_Bal_Seg_Value_Set_Id,
325 -- X_Mgt_Seg_Column_Name,
326 -- X_Mgt_Seg_Value_Set_Id,
327 -- 1);
328 -- Notes
329 --
330 PROCEDURE get_bal_mgt_seg_info(
331 x_bal_seg_column_name OUT NOCOPY VARCHAR2,
332 x_bal_seg_value_set_id OUT NOCOPY NUMBER,
333 x_mgt_seg_column_name OUT NOCOPY VARCHAR2,
334 x_mgt_seg_value_set_id OUT NOCOPY NUMBER,
335 x_chart_of_accounts_id NUMBER);
336
337 -- *********************************************************************
338 -- The following procedures are necessary to handle the base view form.
339
340 PROCEDURE insert_row(
341 x_rowid IN OUT NOCOPY VARCHAR2,
342 x_ledger_id NUMBER,
343 x_name VARCHAR2,
344 x_short_name VARCHAR2,
345 x_chart_of_accounts_id NUMBER,
346 x_chart_of_accounts_name VARCHAR2,
347 x_currency_code VARCHAR2,
348 x_period_set_name VARCHAR2,
349 x_user_period_type VARCHAR2,
350 x_accounted_period_type VARCHAR2,
351 x_first_ledger_period_name VARCHAR2,
352 x_ret_earn_code_combination_id NUMBER,
353 x_suspense_allowed_flag VARCHAR2,
354 x_suspense_ccid NUMBER,
355 x_allow_intercompany_post_flag VARCHAR2,
356 x_enable_avgbal_flag VARCHAR2,
357 x_enable_budgetary_control_f VARCHAR2,
358 x_require_budget_journals_flag VARCHAR2,
359 x_enable_je_approval_flag VARCHAR2,
360 x_enable_automatic_tax_flag VARCHAR2,
361 x_consolidation_ledger_flag VARCHAR2,
362 x_translate_eod_flag VARCHAR2,
363 x_translate_qatd_flag VARCHAR2,
364 x_translate_yatd_flag VARCHAR2,
365 x_automatically_created_flag VARCHAR2,
366 x_track_rounding_imbalance_f VARCHAR2,
367 x_alc_ledger_type_code VARCHAR2,
368 x_le_ledger_type_code VARCHAR2,
369 x_bal_seg_value_option_code VARCHAR2,
370 x_bal_seg_column_name VARCHAR2,
371 x_bal_seg_value_set_id NUMBER,
372 x_mgt_seg_value_option_code VARCHAR2,
373 x_mgt_seg_column_name VARCHAR2,
374 x_mgt_seg_value_set_id NUMBER,
375 x_last_update_date DATE,
376 x_last_updated_by NUMBER,
377 x_creation_date DATE,
378 x_created_by NUMBER,
379 x_last_update_login NUMBER,
380 x_description VARCHAR2,
381 x_future_enterable_periods_lmt NUMBER,
382 x_latest_opened_period_name VARCHAR2,
383 x_latest_encumbrance_year NUMBER,
384 x_cum_trans_ccid NUMBER,
385 x_res_encumb_ccid NUMBER,
386 x_net_income_ccid NUMBER,
387 x_balancing_segment VARCHAR2,
388 x_rounding_ccid NUMBER,
389 x_transaction_calendar_id NUMBER,
390 x_transaction_calendar_name VARCHAR2,
391 x_daily_translation_rate_type VARCHAR2,
392 x_daily_user_translation_type VARCHAR2,
393 x_period_average_rate_type VARCHAR2,
394 x_period_avg_user_rate_type VARCHAR2,
395 x_period_end_rate_type VARCHAR2,
396 x_period_end_user_rate_type VARCHAR2,
397 x_context VARCHAR2,
398 x_attribute1 VARCHAR2,
399 x_attribute2 VARCHAR2,
400 x_attribute3 VARCHAR2,
401 x_attribute4 VARCHAR2,
402 x_attribute5 VARCHAR2,
403 x_attribute6 VARCHAR2,
404 x_attribute7 VARCHAR2,
405 x_attribute8 VARCHAR2,
406 x_attribute9 VARCHAR2,
407 x_attribute10 VARCHAR2,
408 x_attribute11 VARCHAR2,
409 x_attribute12 VARCHAR2,
410 x_attribute13 VARCHAR2,
411 x_attribute14 VARCHAR2,
412 x_attribute15 VARCHAR2,
413 x_set_manual_flag VARCHAR2);
414
415 PROCEDURE lock_row(
416 x_rowid VARCHAR2,
417 x_ledger_id NUMBER,
418 x_name VARCHAR2,
419 x_short_name VARCHAR2,
420 x_chart_of_accounts_id NUMBER,
421 x_chart_of_accounts_name VARCHAR2,
422 x_currency_code VARCHAR2,
423 x_period_set_name VARCHAR2,
424 x_user_period_type VARCHAR2,
425 x_accounted_period_type VARCHAR2,
426 x_first_ledger_period_name VARCHAR2,
427 x_ret_earn_code_combination_id NUMBER,
428 x_suspense_allowed_flag VARCHAR2,
429 x_suspense_ccid NUMBER,
430 x_allow_intercompany_post_flag VARCHAR2,
431 x_enable_avgbal_flag VARCHAR2,
432 x_enable_budgetary_control_f VARCHAR2,
433 x_require_budget_journals_flag VARCHAR2,
434 x_enable_je_approval_flag VARCHAR2,
435 x_enable_automatic_tax_flag VARCHAR2,
436 x_consolidation_ledger_flag VARCHAR2,
437 x_translate_eod_flag VARCHAR2,
438 x_translate_qatd_flag VARCHAR2,
439 x_translate_yatd_flag VARCHAR2,
440 x_automatically_created_flag VARCHAR2,
441 x_track_rounding_imbalance_f VARCHAR2,
442 x_alc_ledger_type_code VARCHAR2,
443 x_le_ledger_type_code VARCHAR2,
444 x_bal_seg_value_option_code VARCHAR2,
445 x_bal_seg_column_name VARCHAR2,
446 x_bal_seg_value_set_id NUMBER,
447 x_mgt_seg_value_option_code VARCHAR2,
448 x_mgt_seg_column_name VARCHAR2,
449 x_mgt_seg_value_set_id NUMBER,
450 x_description VARCHAR2,
451 x_future_enterable_periods_lmt NUMBER,
452 x_latest_opened_period_name VARCHAR2,
453 x_latest_encumbrance_year NUMBER,
454 x_cum_trans_ccid NUMBER,
455 x_res_encumb_ccid NUMBER,
456 x_net_income_ccid NUMBER,
457 x_balancing_segment VARCHAR2,
458 x_rounding_ccid NUMBER,
459 x_transaction_calendar_id NUMBER,
460 x_transaction_calendar_name VARCHAR2,
461 x_daily_translation_rate_type VARCHAR2,
462 x_daily_user_translation_type VARCHAR2,
463 x_period_average_rate_type VARCHAR2,
464 x_period_avg_user_rate_type VARCHAR2,
465 x_period_end_rate_type VARCHAR2,
466 x_period_end_user_rate_type VARCHAR2,
467 x_context VARCHAR2,
468 x_attribute1 VARCHAR2,
469 x_attribute2 VARCHAR2,
470 x_attribute3 VARCHAR2,
471 x_attribute4 VARCHAR2,
472 x_attribute5 VARCHAR2,
473 x_attribute6 VARCHAR2,
474 x_attribute7 VARCHAR2,
475 x_attribute8 VARCHAR2,
476 x_attribute9 VARCHAR2,
477 x_attribute10 VARCHAR2,
478 x_attribute11 VARCHAR2,
479 x_attribute12 VARCHAR2,
480 x_attribute13 VARCHAR2,
481 x_attribute14 VARCHAR2,
482 x_attribute15 VARCHAR2);
483
484 PROCEDURE update_row(
485 x_rowid VARCHAR2,
486 x_ledger_id NUMBER,
487 x_name VARCHAR2,
488 x_short_name VARCHAR2,
489 x_chart_of_accounts_id NUMBER,
490 x_chart_of_accounts_name VARCHAR2,
491 x_currency_code VARCHAR2,
492 x_period_set_name VARCHAR2,
493 x_user_period_type VARCHAR2,
494 x_accounted_period_type VARCHAR2,
495 x_first_ledger_period_name VARCHAR2,
496 x_ret_earn_code_combination_id NUMBER,
497 x_suspense_allowed_flag VARCHAR2,
498 x_suspense_ccid NUMBER,
499 x_allow_intercompany_post_flag VARCHAR2,
500 x_enable_avgbal_flag VARCHAR2,
501 x_enable_budgetary_control_f VARCHAR2,
502 x_require_budget_journals_flag VARCHAR2,
503 x_enable_je_approval_flag VARCHAR2,
504 x_enable_automatic_tax_flag VARCHAR2,
505 x_consolidation_ledger_flag VARCHAR2,
506 x_translate_eod_flag VARCHAR2,
507 x_translate_qatd_flag VARCHAR2,
508 x_translate_yatd_flag VARCHAR2,
509 x_automatically_created_flag VARCHAR2,
510 x_track_rounding_imbalance_f VARCHAR2,
511 x_alc_ledger_type_code VARCHAR2,
512 x_le_ledger_type_code VARCHAR2,
513 x_bal_seg_value_option_code VARCHAR2,
514 x_bal_seg_column_name VARCHAR2,
515 x_bal_seg_value_set_id NUMBER,
516 x_mgt_seg_value_option_code VARCHAR2,
517 x_mgt_seg_column_name VARCHAR2,
518 x_mgt_seg_value_set_id NUMBER,
519 x_implicit_access_set_id NUMBER,
520 x_last_update_date DATE,
521 x_last_updated_by NUMBER,
522 x_last_update_login NUMBER,
523 x_description VARCHAR2,
524 x_future_enterable_periods_lmt NUMBER,
525 x_latest_opened_period_name VARCHAR2,
526 x_latest_encumbrance_year NUMBER,
527 x_cum_trans_ccid NUMBER,
528 x_res_encumb_ccid NUMBER,
529 x_net_income_ccid NUMBER,
530 x_balancing_segment VARCHAR2,
531 x_rounding_ccid NUMBER,
532 x_transaction_calendar_id NUMBER,
533 x_transaction_calendar_name VARCHAR2,
534 x_daily_translation_rate_type VARCHAR2,
535 x_daily_user_translation_type VARCHAR2,
536 x_period_average_rate_type VARCHAR2,
537 x_period_avg_user_rate_type VARCHAR2,
538 x_period_end_rate_type VARCHAR2,
539 x_period_end_user_rate_type VARCHAR2,
540 x_context VARCHAR2,
541 x_attribute1 VARCHAR2,
542 x_attribute2 VARCHAR2,
543 x_attribute3 VARCHAR2,
544 x_attribute4 VARCHAR2,
545 x_attribute5 VARCHAR2,
546 x_attribute6 VARCHAR2,
547 x_attribute7 VARCHAR2,
548 x_attribute8 VARCHAR2,
549 x_attribute9 VARCHAR2,
550 x_attribute10 VARCHAR2,
551 x_attribute11 VARCHAR2,
552 x_attribute12 VARCHAR2,
553 x_attribute13 VARCHAR2,
554 x_attribute14 VARCHAR2,
555 x_attribute15 VARCHAR2,
556 x_set_manual_flag VARCHAR2);
557
558 -- *********************************************************************
559
560 --
561 -- Procedure
562 -- select_row
563 -- Purpose
564 -- select a row
565 -- History
566 -- 02/08/01 O Monnier Created from old sets of books package.
567 -- Arguments
568 -- recinfo record information
569 -- Example
570 -- select_row(recinfo);
571 -- Notes
572 --
573 PROCEDURE select_row(recinfo IN OUT NOCOPY gl_ledgers%ROWTYPE);
574 --
575 -- Procedure
576 -- select_column
577 -- Purpose
578 -- get ledger_name from a row for populating non-database fields
579 --
580 -- History
581 -- 02/08/01 O Monnier Created from old sets of books package.
582 -- Arguments
583 -- ledger_id ledger id
584 -- name ledger name
585 -- Example
586 -- select_column(:block.ledger_id,:block.ledger_name);
587 -- Notes
588 --
589 PROCEDURE select_columns(x_ledger_id NUMBER, x_name IN OUT NOCOPY VARCHAR2);
590 -- Procedure
591 -- update_gl_system_usages
592 -- Purpose
593 -- update the average_balances_flag to 'Y' if average balance processing
594 -- is enabled for at least one ledger.
595 -- History
596 -- 02/08/01 O Monnier Created from old sets of books package.
597 -- Arguments
598 -- cons_lgr_flag Consolidation Ledger Flag
599 PROCEDURE update_gl_system_usages(cons_lgr_flag VARCHAR2);
600 -- Procedure
601 -- insert_gl_net_income_accounts
602 -- Purpose
603 -- insert into gl_net_income_accounts table
604 -- History
605 -- 02/08/01 O Monnier Created from old sets of books package.
606 -- Arguments
607 --
608 PROCEDURE insert_gl_net_income_accounts(
609 x_ledger_id NUMBER,
610 x_balancing_segment VARCHAR2,
611 x_net_income_ccid NUMBER,
612 x_creation_date DATE,
613 x_created_by NUMBER,
614 x_last_update_date DATE,
615 x_last_updated_by NUMBER,
616 x_last_update_login NUMBER,
617 x_request_id NUMBER,
618 x_program_application_id NUMBER,
619 x_program_id NUMBER,
620 x_program_update_date DATE);
621 -- Procedure
622 -- led_update_other_tables
623 -- Purpose
624 -- update the other tables related to the ledger.
625 -- History
626 -- 02/08/01 O Monnier Created from old sets of books package.
627 -- Arguments
628 --
629 PROCEDURE led_update_other_tables(
630 x_ledger_id NUMBER,
631 x_last_update_date DATE,
632 x_last_updated_by NUMBER,
633 x_suspense_ccid NUMBER);
634 -- Procedure
635 -- Check_Avg_Translation
636 -- Purpose
637 -- check the translation status for average balances.
638 -- History
639 -- 02/08/01 O Monnier Created from old sets of books package.
640 -- Arguments
641 --
642 FUNCTION check_avg_translation(x_ledger_id NUMBER)
643 RETURN BOOLEAN;
644 -- Procedure
645 -- enable_manual_je_approval
646 -- Purpose
647 -- Update the journal_approval_flag to 'Y' for 'Manual' source.
648 -- History
649 -- 02/08/01 O Monnier Created from old sets of books package.
650 -- Arguments
651 -- none
652 PROCEDURE enable_manual_je_approval;
653
654 -- *********************************************************************
655 -- The following 3 procedures are necessary to handle the Ledger Sets form.
656 -- Will be removed after the form is removed.
657
658 PROCEDURE insert_set(
659 x_rowid IN OUT NOCOPY VARCHAR2,
660 x_access_set_id IN OUT NOCOPY NUMBER,
661 x_ledger_id NUMBER,
662 x_name VARCHAR2,
663 x_short_name VARCHAR2,
664 x_chart_of_accounts_id NUMBER,
665 x_period_set_name VARCHAR2,
666 x_accounted_period_type VARCHAR2,
667 x_default_ledger_id NUMBER,
668 x_last_update_date DATE,
669 x_last_updated_by NUMBER,
670 x_creation_date DATE,
671 x_created_by NUMBER,
672 x_last_update_login NUMBER,
673 x_description VARCHAR2,
674 x_context VARCHAR2,
675 x_attribute1 VARCHAR2,
676 x_attribute2 VARCHAR2,
677 x_attribute3 VARCHAR2,
678 x_attribute4 VARCHAR2,
679 x_attribute5 VARCHAR2,
680 x_attribute6 VARCHAR2,
681 x_attribute7 VARCHAR2,
682 x_attribute8 VARCHAR2,
683 x_attribute9 VARCHAR2,
684 x_attribute10 VARCHAR2,
685 x_attribute11 VARCHAR2,
686 x_attribute12 VARCHAR2,
687 x_attribute13 VARCHAR2,
688 x_attribute14 VARCHAR2,
689 x_attribute15 VARCHAR2);
690
691 PROCEDURE lock_set(
692 x_rowid VARCHAR2,
693 x_ledger_id NUMBER,
694 x_name VARCHAR2,
695 x_short_name VARCHAR2,
696 x_chart_of_accounts_id NUMBER,
697 x_period_set_name VARCHAR2,
698 x_accounted_period_type VARCHAR2,
699 x_description VARCHAR2,
700 x_context VARCHAR2,
701 x_attribute1 VARCHAR2,
702 x_attribute2 VARCHAR2,
703 x_attribute3 VARCHAR2,
704 x_attribute4 VARCHAR2,
705 x_attribute5 VARCHAR2,
706 x_attribute6 VARCHAR2,
707 x_attribute7 VARCHAR2,
708 x_attribute8 VARCHAR2,
709 x_attribute9 VARCHAR2,
710 x_attribute10 VARCHAR2,
711 x_attribute11 VARCHAR2,
712 x_attribute12 VARCHAR2,
713 x_attribute13 VARCHAR2,
714 x_attribute14 VARCHAR2,
715 x_attribute15 VARCHAR2);
716
717 PROCEDURE update_set(
718 x_rowid VARCHAR2,
719 x_access_set_id NUMBER,
720 x_ledger_id NUMBER,
721 x_name VARCHAR2,
722 x_short_name VARCHAR2,
723 x_chart_of_accounts_id NUMBER,
724 x_period_set_name VARCHAR2,
725 x_accounted_period_type VARCHAR2,
729 x_last_update_login NUMBER,
726 x_default_ledger_id NUMBER,
727 x_last_update_date DATE,
728 x_last_updated_by NUMBER,
730 x_description VARCHAR2,
731 x_context VARCHAR2,
732 x_attribute1 VARCHAR2,
733 x_attribute2 VARCHAR2,
734 x_attribute3 VARCHAR2,
735 x_attribute4 VARCHAR2,
736 x_attribute5 VARCHAR2,
737 x_attribute6 VARCHAR2,
738 x_attribute7 VARCHAR2,
739 x_attribute8 VARCHAR2,
740 x_attribute9 VARCHAR2,
741 x_attribute10 VARCHAR2,
742 x_attribute11 VARCHAR2,
743 x_attribute12 VARCHAR2,
744 x_attribute13 VARCHAR2,
745 x_attribute14 VARCHAR2,
746 x_attribute15 VARCHAR2);
747
748 -- *********************************************************************
749 -- The following procedures are necessary to handle the default ledger
750 -- for a ledger set.
751
752 FUNCTION maintain_def_ledger_assign(
753 x_ledger_set_id NUMBER,
754 x_default_ledger_id NUMBER) RETURN BOOLEAN;
755
756 -- *********************************************************************
757 -- Procedure
758 -- Get_CCID
759 -- Purpose
760 -- Create or retrieve the code combination given the concatenated segments.
761 -- Called by iSpeed API.
762 -- History
763 -- 11-MAY-04 C Ma Copied from 11i.
764 -- Arguments
765 --
766 PROCEDURE Get_CCID(Y_Chart_Of_Accounts_Id NUMBER,
767 Y_Concat_Segments VARCHAR2,
768 Y_Account_Code VARCHAR2,
769 Y_Average_Balances_Flag VARCHAR2,
770 Y_User_Id NUMBER,
771 Y_Resp_Id NUMBER,
772 Y_Resp_Appl_Id NUMBER,
773 Y_CCID OUT NOCOPY NUMBER
774 );
775
776 -- *********************************************************************
777 -- The following 2 procedures are for the Ledger Set iSetup API.
778
779 PROCEDURE insert_set(
780 x_ledger_id NUMBER,
781 x_name VARCHAR2,
782 x_short_name VARCHAR2,
783 x_chart_of_accounts_id NUMBER,
784 x_period_set_name VARCHAR2,
785 x_accounted_period_type VARCHAR2,
786 x_default_ledger_id NUMBER,
787 x_date DATE,
788 x_user_id NUMBER,
789 x_login_id NUMBER,
790 x_description VARCHAR2,
791 x_context VARCHAR2,
792 x_attribute1 VARCHAR2,
793 x_attribute2 VARCHAR2,
794 x_attribute3 VARCHAR2,
795 x_attribute4 VARCHAR2,
796 x_attribute5 VARCHAR2,
797 x_attribute6 VARCHAR2,
798 x_attribute7 VARCHAR2,
799 x_attribute8 VARCHAR2,
800 x_attribute9 VARCHAR2,
801 x_attribute10 VARCHAR2,
802 x_attribute11 VARCHAR2,
803 x_attribute12 VARCHAR2,
804 x_attribute13 VARCHAR2,
805 x_attribute14 VARCHAR2,
806 x_attribute15 VARCHAR2);
807
808 PROCEDURE update_set(
809 x_ledger_id NUMBER,
810 x_name VARCHAR2,
811 x_short_name VARCHAR2,
812 x_chart_of_accounts_id NUMBER,
813 x_period_set_name VARCHAR2,
814 x_accounted_period_type VARCHAR2,
815 x_default_ledger_id NUMBER,
816 x_date DATE,
817 x_user_id NUMBER,
818 x_login_id NUMBER,
819 x_description VARCHAR2,
820 x_context VARCHAR2,
821 x_attribute1 VARCHAR2,
822 x_attribute2 VARCHAR2,
823 x_attribute3 VARCHAR2,
824 x_attribute4 VARCHAR2,
825 x_attribute5 VARCHAR2,
826 x_attribute6 VARCHAR2,
827 x_attribute7 VARCHAR2,
828 x_attribute8 VARCHAR2,
829 x_attribute9 VARCHAR2,
830 x_attribute10 VARCHAR2,
831 x_attribute11 VARCHAR2,
832 x_attribute12 VARCHAR2,
833 x_attribute13 VARCHAR2,
834 x_attribute14 VARCHAR2,
835 x_attribute15 VARCHAR2);
836
837 -- *********************************************************************
838 --
839 -- Procedure
840 -- remove_lgr_bsv_for_le
841 -- Purpose
842 -- remove ledger bsv if a le with bsv has been deleted.
843 -- History
844 -- 01/13/06 Jen Wu Created
845 -- Arguments
846 -- x_le_id legal entity id
847 -- Example
848 -- GL_LEDGERS_PKG.remove_lgr_bsv_for_le(1);
849 -- Notes
850 --
851
852 PROCEDURE remove_lgr_bsv_for_le(x_le_id NUMBER);
853 -- *********************************************************************
854 --
855 -- Procedure
856 -- process_le_bsv_assign
857 -- Purpose
858 -- Propogate the legal entity BSV assignments to ledgers.
859 -- History
860 -- 21/01/05 C Ma Created
861 -- Arguments
862 -- x_le_id legal entity id
863 -- Example
864 -- GL_LEDGERS_PKG.process_le_bsv_assign(1, 1, '01','I',null,null);
865 -- Notes
866 --
867 PROCEDURE process_le_bsv_assign(x_le_id NUMBER,
868 x_value_set_id NUMBER,
869 x_bsv_value VARCHAR2,
870 x_operation VARCHAR2,
871 x_start_date DATE DEFAULT null,
872 x_end_date DATE DEFAULT null);
873
874 -- *********************************************************************
875 --
876 -- Procedure
877 -- get_bsv_desc
878 -- Purpose
879 -- Get the segment value description.
880 -- History
881 -- 04/06/05 C Ma Created
882 -- Arguments
883 -- x_flex_value_set_id
884 -- x_bal_seg_value
885 -- Example
886 -- GL_LEDGERS_PKG.get_bsv_desc(1002472, '01');
887 -- Notes
888 --
889 FUNCTION get_bsv_desc( x_object_type VARCHAR2,
890 x_object_id NUMBER,
891 x_bal_seg_value VARCHAR2)
892 RETURN VARCHAR2;
893
894 -- *********************************************************************
895 --
896 -- Procedure
897 -- check_calendar_gap
898 -- Purpose
899 -- Check whether there is a gap in the calendar periods. This is copied
900 -- over from check_for_gap procedure in gl_period_statuses_pkg. This one
901 -- is only called from the Accounting Setup Manager in OA.
902 -- History
903 -- 04/28/05 C Ma Created
904 -- Arguments
905 -- x_period_set_name
906 -- x_period_type
907 -- Example
908 -- GL_LEDGERS_PKG.check_calendar_gap('Accounting', 'Month',
909 -- x_gap_flag, x_start_date, x_end_date);
910 -- Notes
911 --
912 PROCEDURE check_calendar_gap (
913 x_period_set_name IN VARCHAR2,
914 x_period_type IN VARCHAR2,
915 x_gap_flag OUT NOCOPY VARCHAR2,
916 x_start_date OUT NOCOPY DATE,
917 x_end_date OUT NOCOPY DATE);
918
919 -- *********************************************************************
920 --
921 -- Procedure
922 -- check_duplicate_ledger
923 -- Purpose
924 -- Check whether there is a gap in the calendar periods. This is copied
925 -- over from check_for_gap procedure in gl_period_statuses_pkg. This one
926 -- is only called from the Accounting Setup Manager in OA.
927 -- History
928 -- 04/28/05 C Ma Created
929 -- Arguments
930 -- x_period_set_name
931 -- x_period_type
932 -- Example
933 -- GL_LEDGERS_PKG.check_duplicate_ledger('Accounting', 1,
934 -- x_dupl_flag);
935 -- Notes
936 --
937 PROCEDURE check_duplicate_ledger (
938 x_object_name IN VARCHAR2,
939 x_object_id IN NUMBER,
940 x_dupl_flag OUT NOCOPY VARCHAR2);
941
942 PROCEDURE check_dupl_ldg_shortname(
943 x_ledger_short_name IN VARCHAR2,
944 x_ledger_id IN NUMBER,
945 x_dupl_flag OUT NOCOPY VARCHAR2);
946
947 PROCEDURE check_dupl_tgr_name (
948 x_target_ledger_name IN VARCHAR2,
949 x_relationship_id IN NUMBER,
950 x_ledger_id IN NUMBER,
951 x_dupl_flag OUT NOCOPY VARCHAR2);
952
953 PROCEDURE check_dupl_tgr_shortname(
954 x_ledger_short_name IN VARCHAR2,
955 x_relationship_id IN NUMBER,
956 x_ledger_id IN NUMBER,
957 x_dupl_flag OUT NOCOPY VARCHAR2);
958
959 PROCEDURE set_status_complete(x_object_type VARCHAR2,
960 x_object_id IN NUMBER);
961
962
963 PROCEDURE check_translation_performed(x_ledger_id IN NUMBER,
964 x_run_flag OUT NOCOPY VARCHAR2);
965
966 PROCEDURE check_calendar_35max_days(x_ledger_id IN NUMBER,
967 x_35day_flag OUT NOCOPY VARCHAR2);
968
969 PROCEDURE check_desc_flex_setup(x_desc_flex_name IN VARCHAR2,
970 x_setup_flag OUT NOCOPY VARCHAR2);
971 PROCEDURE remove_ou_setup(x_config_id IN NUMBER);
972 -- *********************************************************************
973
974 FUNCTION get_short_name ( x_primary_ledger_short_name VARCHAR2,
975 x_suffix_length number)
976 RETURN VARCHAR2;
977 -- *********************************************************************
978 END gl_ledgers_pkg;