1: PACKAGE BODY GL_COA_MIRROR_PKG as
2: /* $Header: glcoamrb.pls 120.2 2005/05/05 02:02:36 kvora ship $ */
3:
4: PROCEDURE set_coa_id ( X_coa_id NUMBER) IS
5: BEGIN
2: /* $Header: glcoamrb.pls 120.2 2005/05/05 02:02:36 kvora ship $ */
3:
4: PROCEDURE set_coa_id ( X_coa_id NUMBER) IS
5: BEGIN
6: gl_coa_mirror_pkg.chart_of_accounts_id := X_coa_id;
7: END set_coa_id;
8:
9: FUNCTION get_coa_id RETURN NUMBER IS
10: profile_val VARCHAR2(100);
11: defined_flag BOOLEAN;
12: as_id NUMBER;
13: coa_id NUMBER;
14: BEGIN
15: IF(gl_coa_mirror_pkg.chart_of_accounts_id is null) then
16: fnd_profile.get_specific(name_z => 'GL_ACCESS_SET_ID',
17: val_z => profile_val,
18: defined_z=> defined_flag);
19: if(profile_val IS NULL OR defined_flag = FALSE) then
26: INTO coa_id
27: FROM gl_access_sets
28: WHERE access_set_id = as_id;
29:
30: gl_coa_mirror_pkg.chart_of_accounts_id := coa_id;
31:
32: END IF;
33:
34: RETURN gl_coa_mirror_pkg.chart_of_accounts_id;
30: gl_coa_mirror_pkg.chart_of_accounts_id := coa_id;
31:
32: END IF;
33:
34: RETURN gl_coa_mirror_pkg.chart_of_accounts_id;
35:
36: EXCEPTION
37: when app_exceptions.application_exception then
38: return -1;
38: return -1;
39:
40: END get_coa_id;
41:
42: END GL_COA_MIRROR_PKG;