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 798: HZ_PARTIES p,

794: status,
795: expiration_date,
796: system_id
797: FROM
798: HZ_PARTIES p,
799: HZ_CONTACT_POINTS cp,
800: HZ_PERSON_LANGUAGE pl,
801: FND_LANGUAGES fl
802: WHERE

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

801: FND_LANGUAGES fl
802: WHERE
803: p.party_id = PartyId
804: AND p.party_type = 'PERSON'
805: AND cp.owner_table_name(+) = 'HZ_PARTIES'
806: AND cp.owner_table_id (+) = p.party_id
807: AND cp.contact_point_type(+) = 'EMAIL'
808: AND cp.primary_flag(+) = 'Y'
809: AND cp.status(+) = 'A'

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

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

Line 990: ,hz_parties prp -- party relationship party

986: ,pr.party_id -- system_id
987: FROM
988: hz_relationships pr
989: ,hz_org_contacts oc
990: ,hz_parties prp -- party relationship party
991: ,hz_parties per
992: ,hz_contact_points cp
993: ,hz_person_language pl
994: ,fnd_languages fl

Line 991: ,hz_parties per

987: FROM
988: hz_relationships pr
989: ,hz_org_contacts oc
990: ,hz_parties prp -- party relationship party
991: ,hz_parties per
992: ,hz_contact_points cp
993: ,hz_person_language pl
994: ,fnd_languages fl
995: WHERE

Line 997: AND pr.subject_table_name = 'HZ_PARTIES'

993: ,hz_person_language pl
994: ,fnd_languages fl
995: WHERE
996: pr.party_id = c_p_rel_party_id
997: AND pr.subject_table_name = 'HZ_PARTIES'
998: AND pr.object_table_name = 'HZ_PARTIES'
999: AND pr.subject_id = per.party_id
1000: AND per.party_type = 'PERSON'
1001: AND ((pr.object_type = 'PERSON' AND pr.directional_flag = 'F')

Line 998: AND pr.object_table_name = 'HZ_PARTIES'

994: ,fnd_languages fl
995: WHERE
996: pr.party_id = c_p_rel_party_id
997: AND pr.subject_table_name = 'HZ_PARTIES'
998: AND pr.object_table_name = 'HZ_PARTIES'
999: AND pr.subject_id = per.party_id
1000: AND per.party_type = 'PERSON'
1001: AND ((pr.object_type = 'PERSON' AND pr.directional_flag = 'F')
1002: OR pr.object_type = 'ORGANIZATION')

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

1002: OR pr.object_type = 'ORGANIZATION')
1003: AND pr.relationship_id = oc.party_relationship_id
1004: AND prp.party_id = pr.party_id
1005: AND prp.party_type = 'PARTY_RELATIONSHIP'
1006: AND cp.owner_table_name(+) = 'HZ_PARTIES'
1007: AND cp.owner_table_id (+) = prp.party_id
1008: AND cp.contact_point_type(+) = 'EMAIL'
1009: AND cp.email_address(+) = prp.email_address
1010: AND cp.primary_flag(+) = 'Y'

Line 1270: HZ_PARTIES p,

1266: status,
1267: expiration_date,
1268: system_id
1269: FROM
1270: HZ_PARTIES p,
1271: HZ_CONTACT_POINTS cp,
1272: HZ_PERSON_LANGUAGE pl,
1273: FND_LANGUAGES fl
1274: WHERE

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

1273: FND_LANGUAGES fl
1274: WHERE
1275: p.party_id = PartyId
1276: AND p.party_type = 'GROUP'
1277: AND cp.owner_table_name(+) = 'HZ_PARTIES'
1278: AND cp.owner_table_id (+) = p.party_id
1279: AND cp.contact_point_type(+) = 'EMAIL'
1280: AND cp.primary_flag(+) = 'Y'
1281: AND cp.status(+) = 'A'

Line 1442: ,hz_parties sp

1438: start_date,
1439: expiration_date
1440: FROM
1441: hz_relationships pr
1442: ,hz_parties sp
1443: ,hz_parties op
1444: WHERE
1445: pr.relationship_id = RelationshipId
1446: and pr.subject_table_name = 'HZ_PARTIES'

Line 1443: ,hz_parties op

1439: expiration_date
1440: FROM
1441: hz_relationships pr
1442: ,hz_parties sp
1443: ,hz_parties op
1444: WHERE
1445: pr.relationship_id = RelationshipId
1446: and pr.subject_table_name = 'HZ_PARTIES'
1447: and pr.object_table_name = 'HZ_PARTIES'

Line 1446: and pr.subject_table_name = 'HZ_PARTIES'

1442: ,hz_parties sp
1443: ,hz_parties op
1444: WHERE
1445: pr.relationship_id = RelationshipId
1446: and pr.subject_table_name = 'HZ_PARTIES'
1447: and pr.object_table_name = 'HZ_PARTIES'
1448: and sp.party_id = pr.subject_id
1449: and sp.party_type = 'PERSON'
1450: and op.party_id = pr.object_id

Line 1447: and pr.object_table_name = 'HZ_PARTIES'

1443: ,hz_parties op
1444: WHERE
1445: pr.relationship_id = RelationshipId
1446: and pr.subject_table_name = 'HZ_PARTIES'
1447: and pr.object_table_name = 'HZ_PARTIES'
1448: and sp.party_id = pr.subject_id
1449: and sp.party_type = 'PERSON'
1450: and op.party_id = pr.object_id
1451: and op.party_type = 'GROUP';