DBA Data[Home] [Help]

APPS.JTF_RS_ACTIVE_REC_CONC_PUB dependencies on JTF_RS_GROUPS_DENORM

Line 6: column in JTF_RS_GROUPS_DENORM and ACTIVE_FLAG in JTF_RS_ROLE_RELATIONS table.

2: /* $Header: jtfrsbab.pls 120.2.12010000.7 2009/02/06 11:50:08 rgokavar ship $ */
3:
4: /****************************************************************************
5: This is a concurrent program to populate ACTIVE_FLAG and LATEST_RELATIONSSHIP_FLAG
6: column in JTF_RS_GROUPS_DENORM and ACTIVE_FLAG in JTF_RS_ROLE_RELATIONS table.
7: This program will be used from concurrrent program "Maintain Current Groups and Roles".
8:
9: Create By NSINGHAI 06-MAY-2003
10: Modified By NSINGHAI 19-DEC-2003 Added Latest_relationship_flag update

Line 34: Usage Note: For table JTF_RS_GROUPS_DENORM, there are 2 columns populated

30: FND_STATS.GATHER_COLUMN_STATS, which are added
31: in Bug7587760.
32:
33:
34: Usage Note: For table JTF_RS_GROUPS_DENORM, there are 2 columns populated
35: by this concurrent prog. If teams require only active relationships,
36: they should, go against ACTIVE_FLAG = 'Y' check. If teams wants
37: active groups as well as the last active relationship, they should
38: go against LATEST_RELATIONSHIP_FLAG = 'Y'

Line 93: -- Following updates are on JTF_RS_GROUPS_DENORM table

89: OPEN c_product_info;
90: FETCH c_product_info INTO l_jtft,l_jtfx,l_jtfu;
91: CLOSE c_product_info;
92:
93: -- Following updates are on JTF_RS_GROUPS_DENORM table
94:
95: -- Update latest relationship flag to 'Y' in groups denorm
96: -- for all rows which has active_flag = 'Y'
97: -- needed for backward compatibility

Line 98: UPDATE /*+ PARALLEL(gd) */ jtf_rs_groups_denorm gd

94:
95: -- Update latest relationship flag to 'Y' in groups denorm
96: -- for all rows which has active_flag = 'Y'
97: -- needed for backward compatibility
98: UPDATE /*+ PARALLEL(gd) */ jtf_rs_groups_denorm gd
99: SET gd.latest_relationship_flag = 'Y'
100: WHERE gd.active_flag = 'Y'
101: AND gd.latest_relationship_flag IS NULL
102: ;

Line 110: UPDATE /*+ PARALLEL(gd) */ jtf_rs_groups_denorm gd

106: COMMIT;
107:
108: -- Update active_flag for new grp relationships in groups denorm
109: -- if a group is active, latest_relationship_flag is active
110: UPDATE /*+ PARALLEL(gd) */ jtf_rs_groups_denorm gd
111: SET gd.active_flag = 'Y'
112: ,gd.latest_relationship_flag = 'Y'
113: WHERE l_sysdate BETWEEN gd.start_date_active
114: AND NVL(gd.end_date_active, l_sysdate + 1)

Line 125: UPDATE /*+ PARALLEL(gd) */ jtf_rs_groups_denorm gd

121: COMMIT;
122:
123: -- update inactive group relations to null. Also update latest relationsip
124: -- to null. We will make them 'Y' for appropriate groups in next update stmt
125: UPDATE /*+ PARALLEL(gd) */ jtf_rs_groups_denorm gd
126: SET gd.active_flag = NULL
127: ,gd.latest_relationship_flag = NULL
128: WHERE l_sysdate NOT BETWEEN gd.start_date_active
129: AND NVL(gd.end_date_active, l_sysdate + 1)

Line 136: fnd_message.set_token('P_TABLE_NAME', 'JTF_RS_GROUPS_DENORM');

132:
133: l_den_update_count := l_den_update_count + SQL%ROWCOUNT ;
134:
135: fnd_message.set_name('JTF', 'JTF_RS_ACTIVE_TO_INACT_COUNT');
136: fnd_message.set_token('P_TABLE_NAME', 'JTF_RS_GROUPS_DENORM');
137: fnd_message.set_token('P_ROWCOUNT', TO_CHAR(SQL%ROWCOUNT));
138: fnd_file.put_line(fnd_file.log, fnd_message.get);
139: fnd_file.new_line(fnd_file.log,1);
140:

Line 192: ,jtf_rs_groups_denorm den2 -- fetch all children of x.child_group_id

188: SELECT /*+ use_hash(x den2 den3) PARALLEL(x) PARALLEL(den2) PARALLEL(den3)*/
189: distinct den3.denorm_grp_id
190: FROM
191: jtf_rs_grp_den_ltst_rel_1_tmp x
192: ,jtf_rs_groups_denorm den2 -- fetch all children of x.child_group_id
193: ,jtf_rs_groups_denorm den3 -- fetch all parent of den2.group_id
194: WHERE den2.parent_group_id = x.child_group_id
195: AND (
196: x.start_date_active BETWEEN den2.start_date_active

Line 193: ,jtf_rs_groups_denorm den3 -- fetch all parent of den2.group_id

189: distinct den3.denorm_grp_id
190: FROM
191: jtf_rs_grp_den_ltst_rel_1_tmp x
192: ,jtf_rs_groups_denorm den2 -- fetch all children of x.child_group_id
193: ,jtf_rs_groups_denorm den3 -- fetch all parent of den2.group_id
194: WHERE den2.parent_group_id = x.child_group_id
195: AND (
196: x.start_date_active BETWEEN den2.start_date_active
197: AND NVL(den2.end_date_active,TO_DATE('12/31/4712','MM/DD/RRRR'))

Line 224: FROM jtf_rs_groups_denorm den4

220: -- latest path to have latest relationship_flag = 'Y'
221: -- for ex. A->B->C->D, for later date range, if the hierarchy is
222: -- A->B->D, we should not fetch rows A-D for old relation.
223: SELECT /*+ full(den4) parallel(den4) */ '1'
224: FROM jtf_rs_groups_denorm den4
225: WHERE den4.group_id = den3.group_id
226: AND den4.parent_group_id = den3.parent_group_id
227: AND den4.START_DATE_active > den3.start_date_active
228: )

Line 231: FROM jtf_rs_groups_denorm den5

227: AND den4.START_DATE_active > den3.start_date_active
228: )
229: AND NOT EXISTS (-- only 1 value should be valid for each denorm level
230: SELECT /*+ full(den5) parallel(den5) */ '1'
231: FROM jtf_rs_groups_denorm den5
232: WHERE den5.group_id = den3.group_id
233: AND den5.denorm_level = den3.denorm_level
234: AND den5.denorm_grp_id <> den3.denorm_grp_id
235: AND den5.start_date_active > den3.start_date_active

Line 254: FROM jtf_rs_groups_denorm den

250: INSERT /*+ PARALLEL(a) NOLOGGING */ INTO jtf_rs_grp_den_ltst_rel_2_tmp a
251: (a.denorm_grp_id)
252: SELECT /*+ PARALLEL(den) */
253: den.denorm_grp_id
254: FROM jtf_rs_groups_denorm den
255: WHERE den.denorm_level = 0
256: AND den.latest_relationship_flag IS NULL
257: AND NOT EXISTS (SELECT 1 FROM jtf_rs_grp_den_ltst_rel_2_tmp tmp
258: WHERE tmp.denorm_grp_id = den.denorm_grp_id)

Line 285: FROM jtf_rs_groups_denorm gd, jtf_rs_grp_den_ltst_rel_2_tmp x

281: -- have put this check to avoid unnecessary update operation improve performance.
282: IF (l_data_to_update IS NOT NULL) THEN
283:
284: UPDATE ( SELECT /*+ PARALLEL(gd) PARALLEL(x) */ gd.latest_relationship_flag
285: FROM jtf_rs_groups_denorm gd, jtf_rs_grp_den_ltst_rel_2_tmp x
286: WHERE x.denorm_grp_id = gd.denorm_grp_id
287: )
288: SET latest_relationship_flag = 'Y'
289: ;

Line 297: fnd_message.set_token('P_TABLE_NAME', 'JTF_RS_GROUPS_DENORM');

293:
294: END IF;
295:
296: fnd_message.set_name('JTF', 'JTF_RS_INACT_TO_ACTIVE_COUNT');
297: fnd_message.set_token('P_TABLE_NAME', 'JTF_RS_GROUPS_DENORM');
298: fnd_message.set_token('P_ROWCOUNT', TO_CHAR(l_update_count));
299: fnd_file.put_line(fnd_file.LOG, fnd_message.get);
300: fnd_file.new_line(fnd_file.LOG,1);
301:

Line 364: -- ,tabname=>'JTF_RS_GROUPS_DENORM'

360: so that it performs faster, that too only if columns are updated.
361: As per perf team guidelines "percent" should be 10% */
362:
363: --FND_STATS.GATHER_TABLE_STATS(ownname=> l_jtfu
364: -- ,tabname=>'JTF_RS_GROUPS_DENORM'
365: -- );
366:
367: --FND_STATS.GATHER_TABLE_STATS(ownname=> l_jtfu
368: -- ,tabname=>'JTF_RS_ROLE_RELATIONS'

Line 374: tabname => 'JTF_RS_GROUPS_DENORM',

370:
371: IF (l_den_update_count > 0) THEN
372:
373: /* FND_STATS.GATHER_COLUMN_STATS(ownname => l_jtfu,
374: tabname => 'JTF_RS_GROUPS_DENORM',
375: colname => 'LATEST_RELATIONSHIP_FLAG',
376: percent => 10,
377: degree => null,
378: hsize => null,

Line 385: tabname => 'JTF_RS_GROUPS_DENORM',

381: hmode => 'FULL'
382: );
383: */
384: FND_STATS.GATHER_COLUMN_STATS(ownname => l_jtfu,
385: tabname => 'JTF_RS_GROUPS_DENORM',
386: colname => 'LATEST_RELATIONSHIP_FLAG',
387: percent => 10
388: );
389: END IF;