DBA Data[Home] [Help]

APPS.IMC_REPORTS_SUMMARY_PKG dependencies on HZ_CODE_ASSIGNMENTS

Line 120: -- HZ_CODE_ASSIGNMENTS table

116:
117: -- INSERT all the categories for ORGANIZATION
118:
119: -- fix bug 3296096, get CUSTOMER_CATEGORY from
120: -- HZ_CODE_ASSIGNMENTS table
121:
122: -- fix perf bug 3638775, here are the steps
123: -- Run sql statement twice is much faster than having outer join to HZ_PARTIES
124: -- 1) get all industry with customer_category

Line 140: FROM hz_parties pty, hz_code_assignments look, ar_lookups lkp

136: SELECT 'INDUSTRY','R',
137: industry, 'YES' industry_code, sum(org_count), sysdate
138: FROM (SELECT lkp.meaning industry,
139: decode(pty.party_type, 'ORGANIZATION', count(*), 0) org_count
140: FROM hz_parties pty, hz_code_assignments look, ar_lookups lkp
141: WHERE look.class_category = 'CUSTOMER_CATEGORY'
142: AND look.owner_table_name = 'HZ_PARTIES'
143: AND pty.party_id = look.owner_table_id
144: AND pty.party_type = 'ORGANIZATION'

Line 155: FROM hz_parties pty, hz_code_assignments look, ar_lookups lkp

151:
152: -- Step 2
153: SELECT count(1) INTO l_nd_ind
154: FROM (SELECT 1
155: FROM hz_parties pty, hz_code_assignments look, ar_lookups lkp
156: WHERE look.class_category = 'CUSTOMER_CATEGORY'
157: AND look.owner_table_name = 'HZ_PARTIES'
158: AND pty.party_id = look.owner_table_id
159: AND pty.party_type = 'ORGANIZATION'

Line 1328: , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt

1324: -- get contact count
1325: cursor get_cnt_count is
1326: SELECT count(1)
1327: FROM HZ_ORG_CONTACTS oc, HZ_RELATIONSHIPS r, HZ_PARTIES p
1328: , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt
1329: WHERE oc.party_relationship_id = r.relationship_id
1330: AND r.subject_type = 'PERSON'
1331: AND r.subject_id = p.party_id
1332: AND ca.class_category = 'RELATIONSHIP_TYPE_GROUP'

Line 1606: ELSIF(p_table_name = 'HZ_CODE_ASSIGNMENTS') THEN

1602: l_perf_hint := ' /*+ PARALLEL(rt) PARALLEL(ca) PARALLEL(pty) PARALLEL(r) PARALLEL(orgcnt) */ ';
1603: ELSIF(p_table_name = 'HZ_ORG_CONTACT_ROLES') THEN
1604: table_prefix := 'ocrole.';
1605: fromandwhere_str := get_org_contact_role_clause(p_table_name, p_party_type, p_attribute, p_system_date, x_return_status);
1606: ELSIF(p_table_name = 'HZ_CODE_ASSIGNMENTS') THEN
1607: table_prefix := 'ca.';
1608: fromandwhere_str := get_code_assign_clause(p_table_name, p_party_type, p_attribute, p_system_date, x_return_status);
1609: END IF;
1610:

Line 1628: IF((p_table_name = 'HZ_ORGANIZATION_PROFILES') OR (p_table_name = 'HZ_PERSON_PROFILES') OR (p_table_name = 'HZ_CODE_ASSIGNMENTS')) THEN

1624: ':p_date '||fromandwhere_str;
1625:
1626: write_log('>> sql string: '||str);
1627:
1628: IF((p_table_name = 'HZ_ORGANIZATION_PROFILES') OR (p_table_name = 'HZ_PERSON_PROFILES') OR (p_table_name = 'HZ_CODE_ASSIGNMENTS')) THEN
1629: execute immediate str using p_system_date, p_system_date, p_system_date;
1630: ELSE
1631: execute immediate str using p_system_date;
1632: END IF;

Line 2509: , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt

2505: -- count CONTACT
2506: cursor get_contact_count(l_date DATE) is
2507: SELECT count(1)
2508: FROM HZ_ORG_CONTACTS oc, HZ_RELATIONSHIPS r, HZ_PARTIES p
2509: , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt
2510: WHERE oc.party_relationship_id = r.relationship_id
2511: AND r.subject_type = 'PERSON'
2512: AND r.subject_id = p.party_id
2513: AND ca.class_category = 'RELATIONSHIP_TYPE_GROUP'

Line 2612: ' , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt'||

2608: BEGIN
2609:
2610: IF(p_party_type = 'CONTACT') THEN
2611: str := ' from HZ_ORG_CONTACTS oc, HZ_RELATIONSHIPS r, HZ_PARTIES pty'||
2612: ' , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt'||
2613: ' where pty.status in (''A'',''I'')'||
2614: ' and oc.party_relationship_id = r.relationship_id' ||
2615: ' and r.subject_type = ''PERSON'''||
2616: ' and r.party_id = pty.party_id'||

Line 2652: ' from HZ_CODE_ASSIGNMENTS c'||

2648: BEGIN
2649:
2650: -- code assignment is only for organization report
2651: str := ' from (select owner_table_id '||p_attribute||
2652: ' from HZ_CODE_ASSIGNMENTS c'||
2653: ' where owner_table_name = ''HZ_PARTIES'''||
2654: ' and status = ''A'''||
2655: ' and :p_date between c.start_date_active and nvl(c.end_date_active,:p_date)'||
2656: ' group by owner_table_id) ca';

Line 2724: ' HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt'||

2720:
2721: IF(p_party_type = 'CONTACT') THEN
2722: str := ' from HZ_PARTIES pty, HZ_CONTACT_POINTS contpt,'||
2723: ' HZ_ORG_CONTACTS oc, HZ_RELATIONSHIPS r,'||
2724: ' HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt'||
2725: ' where pty.status in (''A'',''I'')'||
2726: ' and oc.party_relationship_id = r.relationship_id' ||
2727: ' and r.subject_type = ''PERSON'''||
2728: ' and r.party_id = pty.party_id'||

Line 2773: ' , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt'||

2769: BEGIN
2770:
2771: -- org_contact is only used for contact report
2772: str := ' from HZ_ORG_CONTACTS orgcnt, HZ_RELATIONSHIPS r, HZ_PARTIES pty'||
2773: ' , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt'||
2774: ' where pty.status in (''A'',''I'')'||
2775: ' and orgcnt.party_relationship_id = r.relationship_id' ||
2776: ' and r.subject_type = ''PERSON'''||
2777: ' and r.party_id = pty.party_id'||

Line 2808: ' , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt'||

2804: BEGIN
2805:
2806: str := ' from (select r.party_id '||p_attribute||
2807: ' from HZ_ORG_CONTACTS orgcnt, HZ_RELATIONSHIPS r, HZ_PARTIES pty'||
2808: ' , HZ_CODE_ASSIGNMENTS ca, HZ_RELATIONSHIP_TYPES rt'||
2809: ' where pty.status in (''A'',''I'')'||
2810: ' and orgcnt.party_relationship_id = r.relationship_id' ||
2811: ' and r.subject_type = ''PERSON'''||
2812: ' and r.party_id = pty.party_id'||