DBA Data[Home] [Help]

APPS.CN_FORMULA_GEN_PKG dependencies on CN_OBJECTS

Line 14: table_alias cn_objects.name%TYPE,

10: -- following type def added for Formula Perf 11.5.10 Enhancments
11: TYPE exp_tbl_clmn_names_type IS record
12: (exp_type_name VARCHAR2(3),
13: calc_sql_exp_id cn_calc_sql_exps.calc_sql_exp_id%TYPE,
14: table_alias cn_objects.name%TYPE,
15: table_name cn_objects.name%type,
16: table_object_id cn_objects.object_id%TYPE,
17: schema cn_objects.schema%TYPE,
18: column_object_id cn_objects.object_id%TYPE,

Line 15: table_name cn_objects.name%type,

11: TYPE exp_tbl_clmn_names_type IS record
12: (exp_type_name VARCHAR2(3),
13: calc_sql_exp_id cn_calc_sql_exps.calc_sql_exp_id%TYPE,
14: table_alias cn_objects.name%TYPE,
15: table_name cn_objects.name%type,
16: table_object_id cn_objects.object_id%TYPE,
17: schema cn_objects.schema%TYPE,
18: column_object_id cn_objects.object_id%TYPE,
19: column_alias cn_objects.name%TYPE,

Line 16: table_object_id cn_objects.object_id%TYPE,

12: (exp_type_name VARCHAR2(3),
13: calc_sql_exp_id cn_calc_sql_exps.calc_sql_exp_id%TYPE,
14: table_alias cn_objects.name%TYPE,
15: table_name cn_objects.name%type,
16: table_object_id cn_objects.object_id%TYPE,
17: schema cn_objects.schema%TYPE,
18: column_object_id cn_objects.object_id%TYPE,
19: column_alias cn_objects.name%TYPE,
20: column_name cn_objects.schema%TYPE,

Line 17: schema cn_objects.schema%TYPE,

13: calc_sql_exp_id cn_calc_sql_exps.calc_sql_exp_id%TYPE,
14: table_alias cn_objects.name%TYPE,
15: table_name cn_objects.name%type,
16: table_object_id cn_objects.object_id%TYPE,
17: schema cn_objects.schema%TYPE,
18: column_object_id cn_objects.object_id%TYPE,
19: column_alias cn_objects.name%TYPE,
20: column_name cn_objects.schema%TYPE,
21: variable_name VARCHAR2(61),

Line 18: column_object_id cn_objects.object_id%TYPE,

14: table_alias cn_objects.name%TYPE,
15: table_name cn_objects.name%type,
16: table_object_id cn_objects.object_id%TYPE,
17: schema cn_objects.schema%TYPE,
18: column_object_id cn_objects.object_id%TYPE,
19: column_alias cn_objects.name%TYPE,
20: column_name cn_objects.schema%TYPE,
21: variable_name VARCHAR2(61),
22: alias_added BOOLEAN

Line 19: column_alias cn_objects.name%TYPE,

15: table_name cn_objects.name%type,
16: table_object_id cn_objects.object_id%TYPE,
17: schema cn_objects.schema%TYPE,
18: column_object_id cn_objects.object_id%TYPE,
19: column_alias cn_objects.name%TYPE,
20: column_name cn_objects.schema%TYPE,
21: variable_name VARCHAR2(61),
22: alias_added BOOLEAN
23: );

Line 20: column_name cn_objects.schema%TYPE,

16: table_object_id cn_objects.object_id%TYPE,
17: schema cn_objects.schema%TYPE,
18: column_object_id cn_objects.object_id%TYPE,
19: column_alias cn_objects.name%TYPE,
20: column_name cn_objects.schema%TYPE,
21: variable_name VARCHAR2(61),
22: alias_added BOOLEAN
23: );
24:

Line 30: table_alias cn_objects.name%TYPE,

26:
27: TYPE exp_tbl_names_type IS record
28: (exp_type_name VARCHAR2(3),
29: calc_sql_exp_id cn_calc_sql_exps.calc_sql_exp_id%TYPE,
30: table_alias cn_objects.name%TYPE,
31: table_name cn_objects.name%TYPE,
32: table_object_id cn_objects.object_id%TYPE,
33: schema cn_objects.schema%TYPE,
34: variable_name VARCHAR2(61),

Line 31: table_name cn_objects.name%TYPE,

27: TYPE exp_tbl_names_type IS record
28: (exp_type_name VARCHAR2(3),
29: calc_sql_exp_id cn_calc_sql_exps.calc_sql_exp_id%TYPE,
30: table_alias cn_objects.name%TYPE,
31: table_name cn_objects.name%TYPE,
32: table_object_id cn_objects.object_id%TYPE,
33: schema cn_objects.schema%TYPE,
34: variable_name VARCHAR2(61),
35: column_name_list VARCHAR2(32000)

Line 32: table_object_id cn_objects.object_id%TYPE,

28: (exp_type_name VARCHAR2(3),
29: calc_sql_exp_id cn_calc_sql_exps.calc_sql_exp_id%TYPE,
30: table_alias cn_objects.name%TYPE,
31: table_name cn_objects.name%TYPE,
32: table_object_id cn_objects.object_id%TYPE,
33: schema cn_objects.schema%TYPE,
34: variable_name VARCHAR2(61),
35: column_name_list VARCHAR2(32000)
36: );

Line 33: schema cn_objects.schema%TYPE,

29: calc_sql_exp_id cn_calc_sql_exps.calc_sql_exp_id%TYPE,
30: table_alias cn_objects.name%TYPE,
31: table_name cn_objects.name%TYPE,
32: table_object_id cn_objects.object_id%TYPE,
33: schema cn_objects.schema%TYPE,
34: variable_name VARCHAR2(61),
35: column_name_list VARCHAR2(32000)
36: );
37:

Line 39: (table_alias cn_objects.name%TYPE,

35: column_name_list VARCHAR2(32000)
36: );
37:
38: TYPE comm_tbl_clmn_names_type IS record
39: (table_alias cn_objects.name%TYPE,
40: table_name cn_objects.name%TYPE,
41: column_name cn_objects.schema%TYPE,
42: column_alias cn_objects.name%TYPE);
43:

Line 40: table_name cn_objects.name%TYPE,

36: );
37:
38: TYPE comm_tbl_clmn_names_type IS record
39: (table_alias cn_objects.name%TYPE,
40: table_name cn_objects.name%TYPE,
41: column_name cn_objects.schema%TYPE,
42: column_alias cn_objects.name%TYPE);
43:
44:

Line 41: column_name cn_objects.schema%TYPE,

37:
38: TYPE comm_tbl_clmn_names_type IS record
39: (table_alias cn_objects.name%TYPE,
40: table_name cn_objects.name%TYPE,
41: column_name cn_objects.schema%TYPE,
42: column_alias cn_objects.name%TYPE);
43:
44:
45:

Line 42: column_alias cn_objects.name%TYPE);

38: TYPE comm_tbl_clmn_names_type IS record
39: (table_alias cn_objects.name%TYPE,
40: table_name cn_objects.name%TYPE,
41: column_name cn_objects.schema%TYPE,
42: column_alias cn_objects.name%TYPE);
43:
44:
45:
46:

Line 180: FROM cn_objects_all

176:
177: -- get list of tables which can be used for expression building
178: CURSOR osc_elements IS
179: SELECT user_name,schema, name, alias, object_id
180: FROM cn_objects_all
181: WHERE calc_eligible_flag = 'Y'
182: AND object_type in ('TBL', 'VIEW')
183: AND user_name is not null
184: AND object_id < 0

Line 192: FROM cn_objects_all

188:
189: -- get list of columns which can be used in expression building
190: CURSOR table_columns(p_table_id number) is
191: SELECT user_name, name ,object_id ,alias
192: FROM cn_objects_all
193: WHERE table_id = p_table_id
194: AND calc_formula_flag = 'Y'
195: AND object_type = 'COL'
196: AND org_id = g_org_id

Line 202: FROM cn_objects_all

198:
199: --get alias of commlines table
200: CURSOR comm_line_alias is
201: SELECT alias
202: FROM cn_objects_all
203: WHERE name = 'CN_COMMISSION_LINES'
204: AND object_type in ('TBL', 'VIEW')
205: AND org_id = g_org_id;
206:

Line 215: l_table_object_id cn_objects.object_id%type;

211: counter_1 NUMBER(10) := 1;
212: counter_2 NUMBER(10) := 1;
213: counter_3 NUMBER(10) := 1;
214: counter_4 NUMBER(10) := 1;
215: l_table_object_id cn_objects.object_id%type;
216: l_comm_tbl_clmn_names_tbl comm_tbl_clmn_names_type;
217: l_comm_line_alias VARCHAR2(100);
218:
219: -- declare null variables for intialization

Line 809: -- Get the object_id in cn_objects for formula, if not exist, create it.

805: end if;
806: raise;
807: END;
808:
809: -- Get the object_id in cn_objects for formula, if not exist, create it.
810: PROCEDURE check_create_object(x_name cn_objects.name%TYPE,
811: x_object_type cn_objects.object_type%TYPE,
812: x_object_id IN OUT NOCOPY cn_objects.object_id%TYPE,
813: x_repository_id cn_repositories.repository_id%TYPE)

Line 810: PROCEDURE check_create_object(x_name cn_objects.name%TYPE,

806: raise;
807: END;
808:
809: -- Get the object_id in cn_objects for formula, if not exist, create it.
810: PROCEDURE check_create_object(x_name cn_objects.name%TYPE,
811: x_object_type cn_objects.object_type%TYPE,
812: x_object_id IN OUT NOCOPY cn_objects.object_id%TYPE,
813: x_repository_id cn_repositories.repository_id%TYPE)
814: IS

Line 811: x_object_type cn_objects.object_type%TYPE,

807: END;
808:
809: -- Get the object_id in cn_objects for formula, if not exist, create it.
810: PROCEDURE check_create_object(x_name cn_objects.name%TYPE,
811: x_object_type cn_objects.object_type%TYPE,
812: x_object_id IN OUT NOCOPY cn_objects.object_id%TYPE,
813: x_repository_id cn_repositories.repository_id%TYPE)
814: IS
815: dummy NUMBER;

Line 812: x_object_id IN OUT NOCOPY cn_objects.object_id%TYPE,

808:
809: -- Get the object_id in cn_objects for formula, if not exist, create it.
810: PROCEDURE check_create_object(x_name cn_objects.name%TYPE,
811: x_object_type cn_objects.object_type%TYPE,
812: x_object_id IN OUT NOCOPY cn_objects.object_id%TYPE,
813: x_repository_id cn_repositories.repository_id%TYPE)
814: IS
815: dummy NUMBER;
816: x_rowid ROWID;

Line 818: -- check whether formula package exist in cn_objects

814: IS
815: dummy NUMBER;
816: x_rowid ROWID;
817: BEGIN
818: -- check whether formula package exist in cn_objects
819: SELECT COUNT(*)
820: INTO dummy
821: FROM cn_objects_all
822: WHERE name = x_name

Line 821: FROM cn_objects_all

817: BEGIN
818: -- check whether formula package exist in cn_objects
819: SELECT COUNT(*)
820: INTO dummy
821: FROM cn_objects_all
822: WHERE name = x_name
823: AND object_type = x_object_type
824: AND org_id = g_org_id;
825:

Line 829: cn_objects_pkg.insert_row( x_rowid => x_rowid,

825:
826: IF dummy = 0 THEN
827: x_object_id := cn_utils.get_object_id;
828:
829: cn_objects_pkg.insert_row( x_rowid => x_rowid,
830: x_object_id => x_object_id,
831: x_org_id => g_org_id,
832: x_dependency_map_complete => 'N',
833: x_name => x_name,

Line 844: FROM cn_objects_all

840: x_object_value => NULL );
841:
842: ELSIF dummy = 1 THEN
843: SELECT object_id INTO x_object_id
844: FROM cn_objects_all
845: WHERE name = x_name
846: AND object_type = x_object_type
847: AND org_id = g_org_id;
848: END IF;

Line 884: -- get the table alias from cn_objects

880: END IF ;
881: END get_table_alias;
882:
883:
884: -- get the table alias from cn_objects
885: FUNCTION get_table_alias_from_cn (p_table_name VARCHAR2 )
886: RETURN VARCHAR2 IS
887: x_table_alias VARCHAR2(30);
888: CURSOR p_table_alias_csr(l_table_name VARCHAR2) IS

Line 890: FROM cn_objects_all

886: RETURN VARCHAR2 IS
887: x_table_alias VARCHAR2(30);
888: CURSOR p_table_alias_csr(l_table_name VARCHAR2) IS
889: SELECT alias
890: FROM cn_objects_all
891: WHERE name = Upper(l_table_name)
892: AND object_type = 'TBL'
893: AND org_id = g_org_id;
894: BEGIN

Line 1332: cn_objects_all obj1,

1328:
1329: CURSOR l_all_column_pairs_csr(l_calc_ext_table_id NUMBER)IS
1330: SELECT lower(obj1.name) internal_column_name, lower(obj2.name) external_column_name
1331: FROM cn_calc_ext_tbl_dtls_all detail,
1332: cn_objects_all obj1,
1333: cn_objects_all obj2
1334: WHERE detail.calc_ext_table_id = l_calc_ext_table_id
1335: AND obj1.object_id = detail.internal_column_id
1336: AND obj1.org_id = detail.org_id

Line 1333: cn_objects_all obj2

1329: CURSOR l_all_column_pairs_csr(l_calc_ext_table_id NUMBER)IS
1330: SELECT lower(obj1.name) internal_column_name, lower(obj2.name) external_column_name
1331: FROM cn_calc_ext_tbl_dtls_all detail,
1332: cn_objects_all obj1,
1333: cn_objects_all obj2
1334: WHERE detail.calc_ext_table_id = l_calc_ext_table_id
1335: AND obj1.object_id = detail.internal_column_id
1336: AND obj1.org_id = detail.org_id
1337: AND obj2.object_id = detail.external_column_id

Line 1346: FROM cn_objects_all obj,

1342: lower(obj.name) internal_table_name,
1343: trim( both ' ' FROM lower(obj.alias) ) internal_table_alias,
1344: lower(l_table_name) external_table_name,
1345: lower(l_table_alias) external_table_alias
1346: FROM cn_objects_all obj,
1347: cn_calc_ext_tables_all map
1348: WHERE lower(map.alias) = l_table_alias
1349: AND map.org_id = g_org_id
1350: AND obj.object_id = map.internal_table_id

Line 1407: cn_objects_all col

1403:
1404: CURSOR l_all_columns_csr IS
1405: SELECT col.table_id, lower(col.name) column_name
1406: FROM cn_calc_ext_tables_all map,
1407: cn_objects_all col
1408: WHERE map.alias = l_table_alias
1409: AND map.org_id = g_org_id
1410: AND col.table_id = map.external_table_id
1411: AND col.org_id = map.org_id

Line 1533: l_table_object_id cn_objects.object_id%type;

1529:
1530: -- Added for 11.5.10 Performance Enhancments
1531: l_counter NUMBER(15);
1532: l_variable_declaration VARCHAR2(1000);
1533: l_table_object_id cn_objects.object_id%type;
1534:
1535: BEGIN
1536: cn_utils.appendcr(body_code);
1537: cn_utils.appindcr(body_code, ' g_commission_payed_ptd NUMBER;');

Line 2705: l_table_object_id cn_objects.object_id%type;

2701: l_operator VARCHAR2(1);
2702:
2703: l_counter NUMBER(15);
2704: l_variable_declaration VARCHAR2(400);
2705: l_table_object_id cn_objects.object_id%type;
2706:
2707: CURSOR itd_inputs IS
2708: SELECT calc_sql_exp_id, rate_dim_sequence, split_flag, cumulative_flag
2709: FROM cn_formula_inputs_all

Line 3532: l_table_object_id cn_objects.object_id%type;

3528: x_repository_id cn_repositories.repository_id%TYPE;
3529:
3530: l_counter NUMBER(15);
3531: l_variable_declaration VARCHAR2(400);
3532: l_table_object_id cn_objects.object_id%type;
3533: l_input_sql_select varchar2(8000);
3534: l_input_sql_from varchar2(4000);
3535: l_input_sql_where varchar2(4000) := 'WHERE 1=1 ';
3536: l_input_sql_select_clob clob;

Line 3913: FROM cn_objects_all

3909: l_perf_sql_where varchar2(4000) := 'WHERE 1=1 ';
3910:
3911: CURSOR l_all_columns_csr (l_table_id NUMBER ) IS
3912: SELECT lower(name) column_name, data_type
3913: FROM cn_objects_all
3914: WHERE table_id = l_table_id
3915: AND org_id = g_org_id
3916: AND object_type = 'COL'
3917: AND primary_key = 'Y'

Line 5062: FROM cn_objects_all co

5058: l_applsys_schema VARCHAR2(30);
5059:
5060: CURSOR pkg_object_id (c_formula_name VARCHAR2, c_obj_type VARCHAR2, c_org_id NUMBER) IS
5061: SELECT co.object_id, UPPER(co.name) name
5062: FROM cn_objects_all co
5063: WHERE co.name = c_formula_name
5064: AND co.object_type = c_obj_type
5065: AND co.org_id = c_org_id;
5066: