DBA Data[Home] [Help]

APPS.HZ_WF_SYNCH dependencies on HZ_PARTIES

Line 157: Subject_table_name = 'HZ_PARTIES' and

153: select party_id
154: from hz_relationships rel,
155: hz_org_contacts org
156: where rel.relationship_id=org.party_relationship_id and
157: Subject_table_name = 'HZ_PARTIES' and
158: Object_table_name = 'HZ_PARTIES' and
159: Directional_flag = 'F' and
160: subject_id = wf_party_id;
161:

Line 158: Object_table_name = 'HZ_PARTIES' and

154: from hz_relationships rel,
155: hz_org_contacts org
156: where rel.relationship_id=org.party_relationship_id and
157: Subject_table_name = 'HZ_PARTIES' and
158: Object_table_name = 'HZ_PARTIES' and
159: Directional_flag = 'F' and
160: subject_id = wf_party_id;
161:
162: Cursor org_update is

Line 167: Subject_table_name = 'HZ_PARTIES' and

163: select party_id
164: from hz_relationships rel,
165: hz_org_contacts org
166: where rel.relationship_id=org.party_relationship_id and
167: Subject_table_name = 'HZ_PARTIES' and
168: Object_table_name = 'HZ_PARTIES' and
169: Directional_flag = 'F' and
170: object_id = l_match_string;
171:

Line 168: Object_table_name = 'HZ_PARTIES' and

164: from hz_relationships rel,
165: hz_org_contacts org
166: where rel.relationship_id=org.party_relationship_id and
167: Subject_table_name = 'HZ_PARTIES' and
168: Object_table_name = 'HZ_PARTIES' and
169: Directional_flag = 'F' and
170: object_id = l_match_string;
171:
172: BEGIN

Line 248: from hz_parties p, hz_person_language l

244: -- anonymous block to find the person corresponding to language
245: BEGIN
246: select p.party_id, party_type
247: into wf_party_id, wf_party_type
248: from hz_parties p, hz_person_language l
249: where p.party_id= l.party_id and
250: primary_language_indicator='Y' and
251: l.status ='A' and
252: language_use_reference_id = wf_lang_user_ref_id;

Line 323: from hz_parties p, hz_person_language l

319: -- anonymous block to find the person corresponding to language
320: BEGIN
321: select p.party_id, party_type
322: into wf_party_id, wf_party_type
323: from hz_parties p, hz_person_language l
324: where p.party_id= l.party_id and
325: -- primary_language_indicator='Y' and
326: -- l.status ='A' and
327: language_use_reference_id = wf_lang_user_ref_id;

Line 395: Subject_table_name = 'HZ_PARTIES' and

391: select party_id
392: into wf_party_id
393: from hz_org_contacts org, hz_relationships rel
394: where org.party_relationship_id=rel.relationship_id and
395: Subject_table_name = 'HZ_PARTIES' and
396: Object_table_name = 'HZ_PARTIES' and
397: Directional_flag = 'F' and
398: org.org_contact_id=l_match_string;
399:

Line 396: Object_table_name = 'HZ_PARTIES' and

392: into wf_party_id
393: from hz_org_contacts org, hz_relationships rel
394: where org.party_relationship_id=rel.relationship_id and
395: Subject_table_name = 'HZ_PARTIES' and
396: Object_table_name = 'HZ_PARTIES' and
397: Directional_flag = 'F' and
398: org.org_contact_id=l_match_string;
399:
400: SynchContactWFRole(wf_party_id);

Line 441: Subject_table_name = 'HZ_PARTIES' and

437: select party_id
438: into wf_party_id
439: from hz_org_contacts org, hz_relationships rel
440: where org.party_relationship_id=rel.relationship_id and
441: Subject_table_name = 'HZ_PARTIES' and
442: Object_table_name = 'HZ_PARTIES' and
443: Directional_flag = 'F' and
444: org.org_contact_id=l_match_string;
445: -- sync contact

Line 442: Object_table_name = 'HZ_PARTIES' and

438: into wf_party_id
439: from hz_org_contacts org, hz_relationships rel
440: where org.party_relationship_id=rel.relationship_id and
441: Subject_table_name = 'HZ_PARTIES' and
442: Object_table_name = 'HZ_PARTIES' and
443: Directional_flag = 'F' and
444: org.org_contact_id=l_match_string;
445: -- sync contact
446: SynchContactWFRole(wf_party_id,TRUE,TRUE);

Line 522: from hz_contact_points pt, hz_parties

518: -- anonymous block to find the party corresponding to CP
519: BEGIN
520: select owner_table_id, party_type
521: into wf_party_id, wf_party_type
522: from hz_contact_points pt, hz_parties
523: where pt.owner_table_id = party_id and
524: pt.contact_point_type = 'EMAIL' and
525: pt.status ='A' and
526: pt.primary_flag='Y' and

Line 527: pt.owner_table_name ='HZ_PARTIES' and

523: where pt.owner_table_id = party_id and
524: pt.contact_point_type = 'EMAIL' and
525: pt.status ='A' and
526: pt.primary_flag='Y' and
527: pt.owner_table_name ='HZ_PARTIES' and
528: pt.contact_point_id = l_match_string;
529: EXCEPTION
530: WHEN NO_DATA_FOUND THEN
531: -- Debug info.

Line 591: from hz_contact_points pt, hz_parties

587: -- anonymous block to find the party corresponding to CP
588: BEGIN
589: select owner_table_id, party_type
590: into wf_party_id, wf_party_type
591: from hz_contact_points pt, hz_parties
592: where pt.owner_table_id = party_id and
593: pt.contact_point_type = 'EMAIL' and
594: pt.owner_table_name ='HZ_PARTIES' and
595: pt.contact_point_id = l_match_string;

Line 594: pt.owner_table_name ='HZ_PARTIES' and

590: into wf_party_id, wf_party_type
591: from hz_contact_points pt, hz_parties
592: where pt.owner_table_id = party_id and
593: pt.contact_point_type = 'EMAIL' and
594: pt.owner_table_name ='HZ_PARTIES' and
595: pt.contact_point_id = l_match_string;
596: EXCEPTION
597: WHEN NO_DATA_FOUND THEN
598: -- Debug info.

Line 793: HZ_PARTIES p,

789: status,
790: expiration_date,
791: system_id
792: FROM
793: HZ_PARTIES p,
794: HZ_CONTACT_POINTS cp,
795: HZ_PERSON_LANGUAGE pl,
796: FND_LANGUAGES fl
797: WHERE

Line 800: AND cp.owner_table_name(+) = 'HZ_PARTIES'

796: FND_LANGUAGES fl
797: WHERE
798: p.party_id = PartyId
799: AND p.party_type = 'PERSON'
800: AND cp.owner_table_name(+) = 'HZ_PARTIES'
801: AND cp.owner_table_id (+) = p.party_id
802: AND cp.contact_point_type(+) = 'EMAIL'
803: AND cp.primary_flag(+) = 'Y'
804: AND cp.status(+) = 'A'

Line 932: 5. Unnecessary joining for 'object' to hz_parties removed

928: 1. Email_format is no longer hardcoded to MAILTEXT when null
929: 2. Email format is truncated to 8 char
930: 3. Email address is truncated to 320 char
931: 4. StartDate, ExpirationDate are populated from relationship table
932: 5. Unnecessary joining for 'object' to hz_parties removed
933: 6. Removed directional flag filtering. This would mean that there
934: are relationship records that must sync up (unlike the previous
935: design). Hence need to re-write the SQL as a cursor.
936:

Line 985: ,hz_parties prp -- party relationship party

981: ,pr.party_id -- system_id
982: FROM
983: hz_relationships pr
984: ,hz_org_contacts oc
985: ,hz_parties prp -- party relationship party
986: ,hz_parties per
987: ,hz_contact_points cp
988: ,hz_person_language pl
989: ,fnd_languages fl

Line 986: ,hz_parties per

982: FROM
983: hz_relationships pr
984: ,hz_org_contacts oc
985: ,hz_parties prp -- party relationship party
986: ,hz_parties per
987: ,hz_contact_points cp
988: ,hz_person_language pl
989: ,fnd_languages fl
990: WHERE

Line 992: AND pr.subject_table_name = 'HZ_PARTIES'

988: ,hz_person_language pl
989: ,fnd_languages fl
990: WHERE
991: pr.party_id = c_p_rel_party_id
992: AND pr.subject_table_name = 'HZ_PARTIES'
993: AND pr.object_table_name = 'HZ_PARTIES'
994: AND pr.subject_id = per.party_id
995: AND per.party_type = 'PERSON'
996: AND ((pr.object_type = 'PERSON' AND pr.directional_flag = 'F')

Line 993: AND pr.object_table_name = 'HZ_PARTIES'

989: ,fnd_languages fl
990: WHERE
991: pr.party_id = c_p_rel_party_id
992: AND pr.subject_table_name = 'HZ_PARTIES'
993: AND pr.object_table_name = 'HZ_PARTIES'
994: AND pr.subject_id = per.party_id
995: AND per.party_type = 'PERSON'
996: AND ((pr.object_type = 'PERSON' AND pr.directional_flag = 'F')
997: OR pr.object_type = 'ORGANIZATION')

Line 1001: AND cp.owner_table_name(+) = 'HZ_PARTIES'

997: OR pr.object_type = 'ORGANIZATION')
998: AND pr.relationship_id = oc.party_relationship_id
999: AND prp.party_id = pr.party_id
1000: AND prp.party_type = 'PARTY_RELATIONSHIP'
1001: AND cp.owner_table_name(+) = 'HZ_PARTIES'
1002: AND cp.owner_table_id (+) = prp.party_id
1003: AND cp.contact_point_type(+) = 'EMAIL'
1004: AND cp.email_address(+) = prp.email_address
1005: AND cp.primary_flag(+) = 'Y'

Line 1245: HZ_PARTIES p,

1241: status,
1242: expiration_date,
1243: system_id
1244: FROM
1245: HZ_PARTIES p,
1246: HZ_CONTACT_POINTS cp,
1247: HZ_PERSON_LANGUAGE pl,
1248: FND_LANGUAGES fl
1249: WHERE

Line 1252: AND cp.owner_table_name(+) = 'HZ_PARTIES'

1248: FND_LANGUAGES fl
1249: WHERE
1250: p.party_id = PartyId
1251: AND p.party_type = 'GROUP'
1252: AND cp.owner_table_name(+) = 'HZ_PARTIES'
1253: AND cp.owner_table_id (+) = p.party_id
1254: AND cp.contact_point_type(+) = 'EMAIL'
1255: AND cp.primary_flag(+) = 'Y'
1256: AND cp.status(+) = 'A'

Line 1417: ,hz_parties sp

1413: start_date,
1414: expiration_date
1415: FROM
1416: hz_relationships pr
1417: ,hz_parties sp
1418: ,hz_parties op
1419: WHERE
1420: pr.relationship_id = RelationshipId
1421: and pr.subject_table_name = 'HZ_PARTIES'

Line 1418: ,hz_parties op

1414: expiration_date
1415: FROM
1416: hz_relationships pr
1417: ,hz_parties sp
1418: ,hz_parties op
1419: WHERE
1420: pr.relationship_id = RelationshipId
1421: and pr.subject_table_name = 'HZ_PARTIES'
1422: and pr.object_table_name = 'HZ_PARTIES'

Line 1421: and pr.subject_table_name = 'HZ_PARTIES'

1417: ,hz_parties sp
1418: ,hz_parties op
1419: WHERE
1420: pr.relationship_id = RelationshipId
1421: and pr.subject_table_name = 'HZ_PARTIES'
1422: and pr.object_table_name = 'HZ_PARTIES'
1423: and sp.party_id = pr.subject_id
1424: and sp.party_type = 'PERSON'
1425: and op.party_id = pr.object_id

Line 1422: and pr.object_table_name = 'HZ_PARTIES'

1418: ,hz_parties op
1419: WHERE
1420: pr.relationship_id = RelationshipId
1421: and pr.subject_table_name = 'HZ_PARTIES'
1422: and pr.object_table_name = 'HZ_PARTIES'
1423: and sp.party_id = pr.subject_id
1424: and sp.party_type = 'PERSON'
1425: and op.party_id = pr.object_id
1426: and op.party_type = 'GROUP';