DBA Data[Home] [Help]

APPS.JTF_RS_SRP_GROUPS_CONC_PUB dependencies on JTF_RS_SRP_GROUPS_INT

Line 5: This is a concurrent program to populate the data in JTF_RS_SRP_GROUPS_INT

1: PACKAGE BODY jtf_rs_srp_groups_conc_pub AS
2: /* $Header: jtfrsbbb.pls 120.0 2005/05/11 08:19:13 appldev noship $ */
3:
4: /****************************************************************************
5: This is a concurrent program to populate the data in JTF_RS_SRP_GROUPS_INT
6: and JTF_RS_SRP_GROUPS. This program will create primary groups for salesreps
7: for date date range from 01/01/1900 to 12/31/4712. For a specific date there
8: will be only one primary group for a salesrep.
9:

Line 86: FROM jtf_rs_srp_groups_int

82: ;
83:
84: CURSOR c1 (ll_salesrep_id NUMBER, ll_org_id NUMBER )IS
85: SELECT salesrep_id, org_id, resource_id, user_id, group_id, start_date, end_date
86: FROM jtf_rs_srp_groups_int
87: WHERE salesrep_id = ll_salesrep_id
88: AND nvl(org_id,-99) = nvl(ll_org_id,-99)
89: AND start_date <= end_date
90: ORDER BY denorm_count, role_type_priority, role_priority;

Line 167: WHERE TABLE_NAME = 'JTF_RS_SRP_GROUPS_INT'

163: BEGIN
164: SELECT owner, table_owner, tablespace_name
165: INTO l_index_owner, l_table_owner, l_index_tblspace
166: FROM ALL_INDEXES
167: WHERE TABLE_NAME = 'JTF_RS_SRP_GROUPS_INT'
168: AND index_name = 'JTF_RS_SRP_GROUPS_INT_N1'
169: AND table_owner= l_jtfu;
170:
171: l_index_exists := 'Y' ;

Line 168: AND index_name = 'JTF_RS_SRP_GROUPS_INT_N1'

164: SELECT owner, table_owner, tablespace_name
165: INTO l_index_owner, l_table_owner, l_index_tblspace
166: FROM ALL_INDEXES
167: WHERE TABLE_NAME = 'JTF_RS_SRP_GROUPS_INT'
168: AND index_name = 'JTF_RS_SRP_GROUPS_INT_N1'
169: AND table_owner= l_jtfu;
170:
171: l_index_exists := 'Y' ;
172:

Line 186: l_stage := 'Stage=DROP_INDEX '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT_N1';

182: AND index_name = 'JTF_RS_GROUPS_DENORM_U1'
183: AND table_owner= l_jtfu;
184: END;
185:
186: l_stage := 'Stage=DROP_INDEX '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT_N1';
187:
188: --------- Drop Index before inserting into intermediate table ----------
189: IF (l_index_exists = 'Y') THEN
190: EXECUTE IMMEDIATE 'DROP INDEX '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT_N1';

Line 190: EXECUTE IMMEDIATE 'DROP INDEX '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT_N1';

186: l_stage := 'Stage=DROP_INDEX '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT_N1';
187:
188: --------- Drop Index before inserting into intermediate table ----------
189: IF (l_index_exists = 'Y') THEN
190: EXECUTE IMMEDIATE 'DROP INDEX '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT_N1';
191: END IF;
192:
193: -------------Insert into intermediate table ---------
194: EXECUTE IMMEDIATE 'TRUNCATE TABLE '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT';

Line 194: EXECUTE IMMEDIATE 'TRUNCATE TABLE '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT';

190: EXECUTE IMMEDIATE 'DROP INDEX '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT_N1';
191: END IF;
192:
193: -------------Insert into intermediate table ---------
194: EXECUTE IMMEDIATE 'TRUNCATE TABLE '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT';
195:
196: COMMIT;
197:
198: l_stage := 'Stage=INSERT_IN_JTF_RS_SRP_GROUPS_INT_TABLE';

Line 198: l_stage := 'Stage=INSERT_IN_JTF_RS_SRP_GROUPS_INT_TABLE';

194: EXECUTE IMMEDIATE 'TRUNCATE TABLE '||l_index_owner||'.JTF_RS_SRP_GROUPS_INT';
195:
196: COMMIT;
197:
198: l_stage := 'Stage=INSERT_IN_JTF_RS_SRP_GROUPS_INT_TABLE';
199:
200: INSERT INTO /*+ APPEND PARALLEL(sg1) NOLOGGING */ jtf_rs_srp_groups_int sg1
201: (srp_groups_id, resource_id, salesrep_id, org_id, user_id,
202: group_id, role_type_code, role_id, role_type_priority,

Line 200: INSERT INTO /*+ APPEND PARALLEL(sg1) NOLOGGING */ jtf_rs_srp_groups_int sg1

196: COMMIT;
197:
198: l_stage := 'Stage=INSERT_IN_JTF_RS_SRP_GROUPS_INT_TABLE';
199:
200: INSERT INTO /*+ APPEND PARALLEL(sg1) NOLOGGING */ jtf_rs_srp_groups_int sg1
201: (srp_groups_id, resource_id, salesrep_id, org_id, user_id,
202: group_id, role_type_code, role_id, role_type_priority,
203: role_priority, start_date, end_date, denorm_count,
204: created_by, creation_date, last_updated_by, last_update_date )

Line 263: l_stage := 'Stage=INSERT_IN_JTF_RS_SRP_GROUPS_INT_TABLE_FOR_UNASSIGNED_GROUPS';

259: ) x ;
260:
261: COMMIT;
262:
263: l_stage := 'Stage=INSERT_IN_JTF_RS_SRP_GROUPS_INT_TABLE_FOR_UNASSIGNED_GROUPS';
264:
265: INSERT INTO /*+ APPEND PARALLEL(sg1) NOLOGGING */ jtf_rs_srp_groups_int sg1
266: (srp_groups_id, resource_id, salesrep_id, org_id, user_id,
267: group_id, role_type_code, role_id, role_type_priority,

Line 265: INSERT INTO /*+ APPEND PARALLEL(sg1) NOLOGGING */ jtf_rs_srp_groups_int sg1

261: COMMIT;
262:
263: l_stage := 'Stage=INSERT_IN_JTF_RS_SRP_GROUPS_INT_TABLE_FOR_UNASSIGNED_GROUPS';
264:
265: INSERT INTO /*+ APPEND PARALLEL(sg1) NOLOGGING */ jtf_rs_srp_groups_int sg1
266: (srp_groups_id, resource_id, salesrep_id, org_id, user_id,
267: group_id, role_type_code, role_id, role_type_priority,
268: role_priority, start_date, end_date, denorm_count,
269: created_by, creation_date, last_updated_by, last_update_date )

Line 298: l_stage := 'Stage=CREATE_INDEX_ON_JTF_RS_SRP_GROUPS_INT_TABLE';

294: ) x;
295:
296: COMMIT;
297:
298: l_stage := 'Stage=CREATE_INDEX_ON_JTF_RS_SRP_GROUPS_INT_TABLE';
299:
300: -------------Create index and Analyze table on Intermediate table -------
301: EXECUTE IMMEDIATE 'CREATE INDEX '||l_index_owner
302: ||'.JTF_RS_SRP_GROUPS_INT_N1 ON '

Line 302: ||'.JTF_RS_SRP_GROUPS_INT_N1 ON '

298: l_stage := 'Stage=CREATE_INDEX_ON_JTF_RS_SRP_GROUPS_INT_TABLE';
299:
300: -------------Create index and Analyze table on Intermediate table -------
301: EXECUTE IMMEDIATE 'CREATE INDEX '||l_index_owner
302: ||'.JTF_RS_SRP_GROUPS_INT_N1 ON '
303: ||l_table_owner||'.JTF_RS_SRP_GROUPS_INT '
304: ||' (salesrep_id, org_id, denorm_count, role_type_priority, role_priority) '
305: ||' TABLESPACE '||l_index_tblspace
306: ||' NOLOGGING PARALLEL (DEGREE '||f_get_degree_of_parallelism||' ) ';

Line 303: ||l_table_owner||'.JTF_RS_SRP_GROUPS_INT '

299:
300: -------------Create index and Analyze table on Intermediate table -------
301: EXECUTE IMMEDIATE 'CREATE INDEX '||l_index_owner
302: ||'.JTF_RS_SRP_GROUPS_INT_N1 ON '
303: ||l_table_owner||'.JTF_RS_SRP_GROUPS_INT '
304: ||' (salesrep_id, org_id, denorm_count, role_type_priority, role_priority) '
305: ||' TABLESPACE '||l_index_tblspace
306: ||' NOLOGGING PARALLEL (DEGREE '||f_get_degree_of_parallelism||' ) ';
307:

Line 308: fnd_stats.gather_table_stats(ownname => l_table_owner, tabname => 'JTF_RS_SRP_GROUPS_INT',

304: ||' (salesrep_id, org_id, denorm_count, role_type_priority, role_priority) '
305: ||' TABLESPACE '||l_index_tblspace
306: ||' NOLOGGING PARALLEL (DEGREE '||f_get_degree_of_parallelism||' ) ';
307:
308: fnd_stats.gather_table_stats(ownname => l_table_owner, tabname => 'JTF_RS_SRP_GROUPS_INT',
309: percent=>5, degree=>f_get_degree_of_parallelism, granularity=>'GLOBAL',cascade=>TRUE);
310:
311: -------------Truncate the Main table ---------
312: l_stage := 'Stage=TRUNCATE_JTF_RS_SRP_GROUPS_STAGE_TABLE';