Wednesday, November 6, 2019

Oracle EBS - AP_SUPPLIER_CONTACTS was not used in R12

AP_SUPPLIER_CONTACTS will be instead of below tables.

HZ_PARTIES
HZ_RELATIONHIPS
HZ_ORG_CONTACTS
hz_contact_points 

The link column in AP_SUPPLIER_CONTACTS map tp the following tables/columns
Per_Party_ID = Party_ID of PERSON Party in HZ_PARTIES
Relationship_ID = Relationship_ID of Rows in HZ_RELATIONHIPS
Rel_Party_ID = Party_ID of PARTY_RELATIONSHIP Party in HZ_PARTIES
Party_Site_ID = Maps to the Party Site created for the PARTY_RELATIONSHIP Party
Org_Contact_ID = Org_Contact_ID from HZ_ORG_CONTACTS
Org_Party_Site_ID = Party_Site_ID of the Supplier Site row.
Assuming you know the party_site_id for an address (which is the value in AP_SUPPLIER_SITES_ALL.party_Site_ID for a site that is associated with that address) you can use this query to get the contact for that address.
SELECT PERSON.person_first_name, PERSON.person_last_name, PTY_REL.address1,
PTY_REL.City, PTY_REL.state, PTY_REL.country,
PTY_REL.Primary_phone_area_code, PTY_REL.primary_phone_number
FROM hz_parties PERSON, hz_parties PTY_REL, ap_supplier_contacts APSC
WHERE APSC.per_party_id = PERSON.party_id
AND APSC.rel_party_id = PTY_REL.party_id
AND APSC.org_party_site_id = <Party_Site_Address_ID>