DBA Data[Home] [Help]

APPS.HZ_DNB_HIERARCHY_PVT dependencies on HZ_RELATIONSHIPS

Line 13: -- RELATIONSHIPS THAT EXIST BETWEEN PARTIES, IN THE HZ_RELATIONSHIPS TABLE, AT ANY TIME CANNOT

9: ---------------------------------------------------------------------------------------------
10: -- NOTE ::::: ALL THE SCENARIOS (RELATIONSHIPS BETWEEN PARTIES) THAT ARE DESCRIBED HERE
11: -- PERTAIN TO DATA THAT IS OBTAINED FROM DNB AND IMPORTED INTO TCA. SINCE NOT
12: -- ALL PARTIES NEED TO BE NECESSARILY PURCHASED BY A TYPICAL USER OF TCA, THE DIFFERENT
13: -- RELATIONSHIPS THAT EXIST BETWEEN PARTIES, IN THE HZ_RELATIONSHIPS TABLE, AT ANY TIME CANNOT
14: -- REPRESENT REALITY ( ALL POSSIBLE RELATIONSHIPS BETWEEN ALL KINDS OF PARTIES, THAT DNB HAS
15: -- IN ITS DATABASE).
16: -- SO THE QUESTION IS, HOW DO WE BEST REPRESENT THE DIFFERENT RELATIONSHIPS BETWEEN DNB IMPORTED
17: -- PARTIES, AS FOUND IN HZ_RELATIONSHIPS, IN A HIERARCHICAL FASHION, WITH THE UNDERSTANDING THAT

Line 17: -- PARTIES, AS FOUND IN HZ_RELATIONSHIPS, IN A HIERARCHICAL FASHION, WITH THE UNDERSTANDING THAT

13: -- RELATIONSHIPS THAT EXIST BETWEEN PARTIES, IN THE HZ_RELATIONSHIPS TABLE, AT ANY TIME CANNOT
14: -- REPRESENT REALITY ( ALL POSSIBLE RELATIONSHIPS BETWEEN ALL KINDS OF PARTIES, THAT DNB HAS
15: -- IN ITS DATABASE).
16: -- SO THE QUESTION IS, HOW DO WE BEST REPRESENT THE DIFFERENT RELATIONSHIPS BETWEEN DNB IMPORTED
17: -- PARTIES, AS FOUND IN HZ_RELATIONSHIPS, IN A HIERARCHICAL FASHION, WITH THE UNDERSTANDING THAT
18: -- THE HZ_RELATIONSHIPS TABLE, MAY ONLY REPRESENT A SUBSET OF REALITY AT ANY GIVEN TIME.
19:
20: ------------------------------------------------------------------------------------------------------------
21: ------------------------------------------------------------------------------------------------------------

Line 18: -- THE HZ_RELATIONSHIPS TABLE, MAY ONLY REPRESENT A SUBSET OF REALITY AT ANY GIVEN TIME.

14: -- REPRESENT REALITY ( ALL POSSIBLE RELATIONSHIPS BETWEEN ALL KINDS OF PARTIES, THAT DNB HAS
15: -- IN ITS DATABASE).
16: -- SO THE QUESTION IS, HOW DO WE BEST REPRESENT THE DIFFERENT RELATIONSHIPS BETWEEN DNB IMPORTED
17: -- PARTIES, AS FOUND IN HZ_RELATIONSHIPS, IN A HIERARCHICAL FASHION, WITH THE UNDERSTANDING THAT
18: -- THE HZ_RELATIONSHIPS TABLE, MAY ONLY REPRESENT A SUBSET OF REALITY AT ANY GIVEN TIME.
19:
20: ------------------------------------------------------------------------------------------------------------
21: ------------------------------------------------------------------------------------------------------------
22: -- SOME DEFINITIONS

Line 60: from hz_relationships

56: IS
57: CURSOR c0
58: IS
59: select 'Y'
60: from hz_relationships
61: where subject_id = p_subject_id
62: and object_id = p_object_id
63: and actual_content_source = 'DNB'
64: and relationship_type = p_relationship_type

Line 101: FROM hz_relationships

97: IS
98: CURSOR c0
99: IS
100: SELECT subject_id, start_date
101: FROM hz_relationships
102: WHERE relationship_code = 'PARENT_OF'
103: and relationship_type = p_relationship_type
104: and actual_content_source = 'DNB'
105: and object_id = p_subject_id

Line 132: FROM hz_relationships

128: IS
129: CURSOR c0
130: IS
131: SELECT subject_id
132: FROM hz_relationships
133: WHERE relationship_code = 'PARENT_OF'
134: and relationship_type = p_relationship_type
135: and actual_content_source = 'DNB'
136: and object_id = p_subject_id

Line 162: FROM hz_relationships

158: IS
159: CURSOR c0
160: IS
161: SELECT subject_id, start_date
162: FROM hz_relationships
163: WHERE relationship_code = 'HEADQUARTERS_OF'
164: and relationship_type = p_relationship_type
165: and actual_content_source = 'DNB'
166: and object_id = p_subject_id

Line 193: FROM hz_relationships

189: IS
190: CURSOR c0
191: IS
192: SELECT subject_id
193: FROM hz_relationships
194: WHERE relationship_code = 'HEADQUARTERS_OF'
195: and relationship_type = p_relationship_type
196: and actual_content_source = 'DNB'
197: and object_id = p_subject_id

Line 222: FROM hz_relationships

218: IS
219: CURSOR c0
220: IS
221: SELECT subject_id, start_date
222: FROM hz_relationships
223: WHERE relationship_code = 'DOMESTIC_ULTIMATE_OF'
224: and relationship_type = p_relationship_type
225: and actual_content_source = 'DNB'
226: and object_id = p_subject_id

Line 252: FROM hz_relationships

248: IS
249: CURSOR c0
250: IS
251: SELECT subject_id
252: FROM hz_relationships
253: WHERE relationship_code = 'DOMESTIC_ULTIMATE_OF'
254: and relationship_type = p_relationship_type
255: and actual_content_source = 'DNB'
256: and object_id = p_subject_id

Line 279: FROM hz_relationships

275: IS
276: CURSOR c0
277: IS
278: SELECT subject_id, start_date
279: FROM hz_relationships
280: WHERE relationship_code = 'GLOBAL_ULTIMATE_OF'
281: and relationship_type = p_relationship_type
282: and actual_content_source = 'DNB'
283: and object_id = p_subject_id

Line 307: FROM hz_relationships

303: IS
304: CURSOR c0
305: IS
306: SELECT subject_id
307: FROM hz_relationships
308: WHERE relationship_code = 'GLOBAL_ULTIMATE_OF'
309: and relationship_type = p_relationship_type
310: and actual_content_source = 'DNB'
311: and object_id = p_subject_id

Line 334: FROM hz_relationships

330: IS
331: CURSOR c0
332: IS
333: SELECT subject_id
334: FROM hz_relationships
335: WHERE relationship_code = 'SUBSIDIARY_OF'
336: and relationship_type = p_relationship_type
337: and actual_content_source = 'DNB'
338: and object_id = p_subject_id

Line 361: FROM hz_relationships

357: IS
358: CURSOR c0
359: IS
360: SELECT subject_id
361: FROM hz_relationships
362: WHERE relationship_code = 'DIVISION_OF'
363: and relationship_type = p_relationship_type
364: and actual_content_source = 'DNB'
365: and object_id = p_subject_id

Line 390: FROM hz_relationships

386: IS
387: CURSOR c0
388: IS
389: SELECT object_id
390: FROM hz_relationships
391: WHERE relationship_type = p_relationship_type
392: and (relationship_code = 'GLOBAL_SUBSIDIARY_OF'
393: or relationship_code = 'DOMESTIC_SUBSIDIARY_OF'
394: or relationship_code = 'DIVISION_OF'

Line 423: from hz_relationships

419: IS
420: CURSOR c0
421: IS
422: select 'Y'
423: from hz_relationships
424: where subject_id = p_subject_id
425: and relationship_type = 'DNB_HIERARCHY'
426: and rownum = 1
427: and (end_date is null

Line 456: from hz_relationships

452: IS
453: CURSOR c0
454: IS
455: select 'Y'
456: from hz_relationships
457: where subject_id = gup_subject_id
458: and relationship_type = 'DNB_HIERARCHY'
459: and rownum = 1
460: and (end_date is null

Line 489: from hz_relationships

485: IS
486: CURSOR c0
487: IS
488: select 'Y'
489: from hz_relationships
490: where object_id = p_subject_id
491: and relationship_code = 'HEADQUARTERS_OF'
492: and relationship_type = 'DNB_HIERARCHY'
493: and (end_date is null

Line 522: from hz_relationships

518: IS
519: CURSOR c0
520: IS
521: select 'Y'
522: from hz_relationships
523: where object_id = p_subject_id
524: and relationship_code = 'PARENT_OF'
525: and relationship_type = 'DNB_HIERARCHY'
526: and (end_date is null

Line 556: from hz_relationships

552: IS
553: CURSOR c0
554: IS
555: select 'Y'
556: from hz_relationships
557: where subject_id = p_subject_id
558: and object_id = gup_subject_id
559: and relationship_code = 'GLOBAL_SUBSIDIARY_OF'
560: and relationship_type = 'DNB_HIERARCHY'

Line 591: from hz_relationships

587: IS
588: CURSOR c0
589: IS
590: select 'Y'
591: from hz_relationships
592: where subject_id = p_subject_id
593: and relationship_code = 'DOMESTIC_SUBSIDIARY_OF'
594: and relationship_type = 'DNB_HIERARCHY'
595: and (end_date is null

Line 625: from hz_relationships

621: IS
622: CURSOR c0
623: IS
624: select 'Y'
625: from hz_relationships
626: where subject_id = p_subject_id
627: and relationship_code = 'GLOBAL_ULTIMATE_OF'
628: and relationship_type = 'DNB_HIERARCHY'
629: and (end_date is null

Line 658: from hz_relationships

654: IS
655: CURSOR c0
656: IS
657: select 'Y'
658: from hz_relationships
659: where subject_id = p_subject_id
660: and relationship_type = p_relationship_type
661: and relationship_code = 'GLOBAL_ULTIMATE_OF'
662: and (end_date is null

Line 692: from hz_relationships

688: IS
689: CURSOR c0
690: IS
691: select 'Y'
692: from hz_relationships
693: where subject_id = p_subject_id
694: and relationship_type = p_relationship_type
695: and relationship_code = 'DOMESTIC_ULTIMATE_OF'
696: and (end_date is null

Line 749: from hz_relationships

745: IS
746: CURSOR c0
747: IS
748: select relationship_id
749: from hz_relationships
750: where subject_id = p_subject_id
751: and relationship_type = p_relationship_type
752: and object_id = p_object_id
753: and relationship_code = p_relationship_code ;

Line 914: FROM hz_relationships

910: x_relationship_id := get_relationship_id(p_subject_id, p_object_id, p_relationship_code, 'DNB_HIERARCHY');
911:
912: -- GET OBJECT VERSION NUMBER FOR THE FETCHED RELATIONSHIP ID
913: SELECT object_version_number INTO x_object_version_number
914: FROM hz_relationships
915: WHERE relationship_id = x_relationship_id
916: AND subject_table_name = 'HZ_PARTIES'
917: AND object_table_name = 'HZ_PARTIES'
918: AND directional_flag = 'F';

Line 1014: from hz_relationships

1010: IS
1011: CURSOR c0
1012: IS
1013: select 'Y'
1014: from hz_relationships
1015: where subject_id = p_subject_id
1016: and actual_content_source = 'DNB'
1017: and relationship_type = 'DNB_HIERARCHY'
1018: and (relationship_code = 'GLOBAL_SUBSIDIARY_OF'

Line 1062: from hz_relationships

1058: IS
1059: CURSOR c0
1060: IS
1061: select 'Y'
1062: from hz_relationships
1063: where subject_id = p_subject_id
1064: and object_id = gup_subject_id
1065: and actual_content_source = 'DNB'
1066: and relationship_type = 'DNB_HIERARCHY'

Line 1108: from hz_relationships

1104: IS
1105: CURSOR c0
1106: IS
1107: select subject_id, relationship_code
1108: from hz_relationships
1109: where object_id = p_subject_id
1110: and actual_content_source = 'DNB'
1111: and relationship_type = 'DNB_HIERARCHY'
1112: and (relationship_code = 'GLOBAL_SUBSIDIARY_OF'

Line 1426: from hz_relationships rel

1422:
1423: -- Bug 4945516
1424: CURSOR c_get_root_parties is
1425: select subject_id
1426: from hz_relationships rel
1427: where rel.actual_content_source = 'DNB'
1428: and rel.relationship_type in ( 'PARENT/SUBSIDIARY' , 'HEADQUARTERS/DIVISION' )
1429: and rel.relationship_code in ( 'SUBSIDIARY_OF' , 'DIVISION_OF' )
1430: and ( rel.end_date is null

Line 1439: from hz_relationships

1435: and rel.subject_type='ORGANIZATION'
1436: and rel.directional_flag in ('F','B')
1437: and rel.status='A'
1438: and not exists ( select 1
1439: from hz_relationships
1440: where relationship_type in ( 'PARENT/SUBSIDIARY' , 'HEADQUARTERS/DIVISION' )
1441: and relationship_code in ( 'PARENT_OF' , 'HEADQUARTERS_OF' )
1442: and subject_table_name='HZ_PARTIES'
1443: and subject_type='ORGANIZATION'

Line 1522: from hz_relationships rel

1518:
1519: -- Bug 4945516
1520: CURSOR c_get_root_parties is
1521: select rel.subject_id
1522: from hz_relationships rel
1523: where rel.actual_content_source = 'DNB'
1524: and rel.relationship_code in ( 'SUBSIDIARY_OF' , 'DIVISION_OF' )
1525: and ( rel.end_date is null
1526: or rel.end_date > sysdate )

Line 1533: from hz_relationships

1529: and rel.subject_table_name='HZ_PARTIES'
1530: and rel.subject_type='ORGANIZATION'
1531: and rel.directional_flag in ('F','B')
1532: and not exists ( select 1
1533: from hz_relationships
1534: where relationship_code in ( 'PARENT_OF' , 'HEADQUARTERS_OF' )
1535: and subject_table_name='HZ_PARTIES'
1536: and subject_type='ORGANIZATION'
1537: and ( end_date is null