How to See Supplier Contact Information Using SQL in R12
The method of storing information for supplier contacts is very much different in R12 than it is
in 11i. Most of the information is stored in various TCA tables.
The method of storing information for supplier contacts is very much different in R12 than it is
in 11i. Most of the information is stored in various TCA tables. The table AP_SUPPLIER_CONTACTS
is a linking table between the supplier address and the various TCA tables if the contact is
assigned to an address in the form or during Import. For Contacts created in R12 columns such as
Name and Address elements are not populated in AP_SUPPLIER_CONTACTS. Contacts that were directly upgraded from 11i will have their legacy values in this table, but the form and other processes
that use or display this information for contacts use the TCA tables.
When a Contact is created, two rows are created in HZ_PARTIES (though it is possible that only one is created if the name already existed in the system when the contact was entered). One is of type PERSON, and the other is of type PARTY_RELATIONSHIP. The PERSON type party stores name information and the like, while address elements and contact information (phone number, for example) are stored in the PARTY_RELATIONSHIP type party. These are linked to the ORGANIZATION type Party of the Supplier by a row in HZ_RELATIONSHIPS. The kind of contact (Manager, Sales Rep, etc) is stored in HZ_ORG_CONTACTS. When you assign a contact to a supplier address you create a row in AP_SUPPLIER_CONTACTS that links all things together and maps it back to the party site created as the address.
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 =
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13247/viewspace-1052506/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Using SQL Script Get Information about ASMSQLORMASM
- POXPOEPO Supplier Contact Field List Of Values Contains No EntriesAI
- How to Quickly Create a Copy of a Table using Transact-SQLUISQL
- How to get complete sessions informationSessionORM
- How to Find Out How Much Space an Index is UsingIndex
- JAR creation failed. See details for additional information解決方案大全JARAIORM
- How to get the description of blast hit using blastdbcmd?AST
- How to develop locally a Laravel app using LaragondevLaravelAPPGo
- How To Using Flashback Data Archive (Oracle Total Recall)HiveOracle
- How to Restore the Database Using AMDU after Diskgroup CorruptionRESTDatabase
- How to check whether the current database in using Oracle optionsDatabaseOracle
- Metlink:How to Modify Public Network Information including VIP in CrsORM
- how to run demo city bars using sencha architect
- How to copy a datafile from ASM to a file system not using RMANASM
- How To Export a Concurrent Program and Executable Using Fndload ?Export
- [oradebug命令學習3]How to Enable SQL_TRACE for Another Session Using OradebugSQLSession
- sql之27 using sql*plusSQL
- sql之26 using sql*plusSQL
- Using Diagwait as a diagnostic to get more information for diagnosing Oracle Clusterware Node evictiAIORMOracle
- How to Set Device Name Using UDEV on Oracle Linux 7.1devOracleLinux
- How to serve uncommon file in WebDAV using IIS in Win ServerWebServer
- How To Monitor Remote Windows Machine Using Nagios on LinuxREMWindowsMaciOSLinux
- How to Monitor and Log Network Traffic on Linux Using vnStatLinux
- How To Recreate A Database Using TTS (Transportable TableSpace) [ID 733824.1]DatabaseTTS
- R12 - How To Enable and Collect Debug for HTTP, OC4J and OPMNHTTP
- Recipe 5.6. Using SQL to Generate SQLSQL
- How to create the Gold gold using RGB color values All In OneGo
- Using XML Parser for PL/SQLXMLSQL
- How to use hints in Oracle sql for performanceOracleSQLORM
- How To Move Datafiles On AIX Using Raw Logical Volumes To A New Location?AI
- HOW TO SHRINK A TABLE USING ONLINE REDEFINITION (文件 ID 1357878.1)
- How to Move a Database Using Transportable Tablespaces (文件 ID 1493809.1)Database
- How To Handle MLOG$_AP_SUPPLIER_SITES_AL, MLOG$_AP_SUPPLIERS Growing So Much? Having Lots of Data
- Script to Collect Log File Sync Diagnostic Information (lfsdiag.sql)ORMSQL
- Script toCollect Log File Sync Diagnostic Information (lfsdiag.sql)ORMSQL
- How to Perform SQL Server Log ShippingORMSQLServer
- How to use sql result stored on shell variable?SQL
- How to Move Tablespaces Across Platforms Using Transportable Tablespaces With RMAN [ID 371556.1]ROSPlatform