r12 Tca Banks

26
Technical Details on Vendors, Banks, Bank Branches and Bank Accounts Author Lokesh Pille Creation Date:23-Sep-2008 Last Modified Date:23-Sep-2008

Transcript of r12 Tca Banks

Page 1: r12 Tca Banks

Technical Details on Vendors, Banks, Bank Branches and Bank Accounts

Author Lokesh Pille

Creation Date:23-Sep-2008 Last Modified Date:23-Sep-2008

Page 2: r12 Tca Banks

Overview:

This document covers in depth technical details for Vendors, Banks, Bank Branches and Bank Accounts which are part of the TCA Architecture in Release 12. This document doesn’t cover the entire TCA Architecture, it only explains you in detail how the above mentioned entities are inter linked in the TCA Architecture of R12.

This document is purely for your understanding of the new data model for Suppliers, Banks, Bank Branches and Bank Accounts in R12 TCA. Of course this will also be helpful to you when working on various R12 Customizations. Once you go through the document you should be able to write SQL Queries to find out all the Bank Accounts that belongs to a particular Supplier, all the Bank Branches of a particular Bank, Bank name and Bank Branch name of a particular Bank Account etc.

Vendors and TCA Architecture:

Prior to R12, creation of a vendor/supplier record in eBusiness suite largely meant insertion of records into PO_VENDORS table. However, from R12 onwards, records are inserted into at least half a dozen tables when a single Supplier record is created. This is largely due to the fact that Suppliers have been moved into the TCA Data Model.

In this document you will see the set of tables that are affected when a Supplier record gets created in Release12. It will also touch base upon Supplier Sites and changes to taxation related tables.

Page 3: r12 Tca Banks

Create a Supplier: To begin with, we need to create a Supplier. Let’s name it ‘P2P GL Dev Team’. Go to Supplier Entry form from any of the Payables responsibility and simply enter the name of the Supplier in Organization name field and click on Apply button. This will create a Supplier.

Page 4: r12 Tca Banks

Once you click the Apply button the Supplier will be created and you will see the supplier screen like below.

Remember that in the above step you have created a supplier called ‘P2P GL Dev Team’ by entering the name in the Organization field, apart from the Organization field you haven’t entered any value in any other field.

Now, let’s have a look at the list of tables impacted by creating the above Supplier record.

Page 5: r12 Tca Banks

Table HZ_PARTIES

SELECT * FROM HZ_PARTIES WHERE PARTY_NAME = 'P2P GL Dev Team'

This is the master table now in R12, instead of PO_VENDORS. However Oracle has decided to keep all the Supplier information in the AP_SUPPLIERS table instead of expanding the table design HZ_PARTIES to hold the Supplier attributes.

You will notice that the PARTY_NUMBER(52757) in the below screen is the Registry id in the R12 Supplier screen(you may verify the Registry ID in the above Supplier screenshot). Also, the party_id = 316950 will be referenced in the remainder set of tables.

Page 6: r12 Tca Banks

Table HZ_PARTY_USG_ASSIGNMENTS

SELECT party_id ,party_usg_assignment_id,party_usage_code FROM hz_party_usg_assignments WHERE party_id = 316950; --Party ID of the Party ‘P2P GL Dev Team’

This table stores the Party Usages. A party can be a Supplier, Customer, Bank, Bank Branch etc. So, this table helps you to find out weather a given Party is a Supplier or Customer or Employee etc. for example, in our case it captures the fact that the given party_id is of type SUPPLIER.

Page 7: r12 Tca Banks

Table IBY_EXTERNAL_PAYEES_ALL

SELECT * FROM iby_external_payees_all WHERE payee_party_id = 316950 --Party ID of the Party ‘P2P GL Dev Team’

Whenever a Supplier is created a Payee is created and Oracle will use this Payee to store all the Payment related information of the Supplier (Payee). Also, even when you create a Supplier Site the site will be registered as a Payee in this table. This table captures Payment related details of the Supplier/Supplier Site. For example :- 1. How should the supplier's remittance advice must be sent? 2. What is the default Payment method Code for this supplier? 3. Who bears the bank charges when lets say SWIFT payment is made? This information can be setup at either the Supplier level or at Supplier Site level.

Also remember when you assign Bank Accounts(will discuss this later in this document) to Supplier/Supplier Sites, the Bank Accounts will not directly get assigned to Suppliers/Supplier Sites, they will be assigned to Payees. Since this table stores the Payees, it’s critical table while finding the Bank Accounts of a Supplier/Supplier Site.

Page 8: r12 Tca Banks

Table AP_SUPPLIERS

SELECT vendor_id, vendor_name,segment1,enabled_flag FROM ap_suppliers WHERE party_id = 316950; -Party ID of the Party ‘P2P GL Dev Team’

As mentioned earlier, alongside HZ_PARTIES, this is another master table that replaces the PO_VENDORS table of 11i. Instead of expanding the design of HZ_PARTIES, oracle decided to hold the supplier specific attributes in AP_SUPPLIERS.

Page 9: r12 Tca Banks

Table POS_SUPPLIER_MAPPINGS

SELECT * FROM pos_supplier_mappings WHERE party_id = 316950 --Party ID of the Party ‘P2P GL Dev Team’

This table holds the mapping between the AP_SUPPLIERS.VENDOR_ID and HZ_PARTIES.PARTY_ID. This is useful in cases whereby two vendors effectively belongs to the same HZ_Party Record.

Page 10: r12 Tca Banks

Table ZX_PARTY_TAX_PROFILE

SELECT party_id,party_type_code, party_tax_profile_id FROM zx_party_tax_profile WHERE party_id = 316950

The taxation related details like Tax Codes, and Tax Accounts etc have been moved from AP into ZX. ZX is the name of a new Application "E-Business Tax".

Effectively this application is the Tax repository/Taxation Engine for eBusiness Suite starting from R12. Effectively this also means that our good old AP_TAX_CODES_ALL is no longer the master table for Taxes. Now we have a new tax rate table, i.e. ZX_RATES_B. ZX_ACCOUNTS is another table that has been introduced to capture accounting setup related to Tax Codes.

Page 11: r12 Tca Banks

Database View PO_VENDORS

SELECT VENDOR_NAME, SEGMENT1, PARTY_NUMBER FROM PO_VENDORS WHERE PARTY_ID = 316950

PO_VENDORS is a view in R12 that joins AP_SUPPLIERS & HZ_PARTIES. Similarly, PO_VENDOR_SITES and PO_VENDOR_SITES_ALL are also views based upon AP_SUPPLIER_SITES_ALL.

Page 12: r12 Tca Banks

Banks, Bank Branches and Bank Accounts:

We just have finished our exploration on Vendors and TCA. Now we will explore the TCA for Banks, Bank Branches and Bank Accounts. We will be discussing what tables will get affected when we create Bank, Bank Branch and Bank Account. We will also explore the tables that get affected when we assign Bank Accounts to the Suppliers/Supplier Sites.

Create a Bank, Bank Branch and Bank Account in a single go:

Before exploring the Bank related TCA let’s first create a Bank, Bank Branch and Bank Account and assign it to the above created Supplier ‘P2P GL Dev Team’ in a single go.

To create the Bank, Bank Branch and Bank Account go to the Supplier Entry form and query the Supplier ‘P2P GL Dev Team’. Once you query the Supplier you will see the Supplier screen as shown below.

Page 13: r12 Tca Banks

In the above screen Click on ‘Banking Details’ link which is available at the left side vertical menu under the tab Suppliers. Once you click on the ‘Banking Details’ link you will get the screen shown like below.

Page 14: r12 Tca Banks

Click on Create button to go to the Create Bank Account screen. The Create Bank Account screen will look below.

In the Create Bank Account Screen enter the country name for the Country field.

Under the Bank horizontal Bar select the Create New Bank radio button and enter values for Bank Name and Bank Number fields to create a new Bank.

Under the Branch horizontal bar select Create New Branch radio button and enter values in Branch name and Branch Number to create a new Bank Branch.

Under the Bank Account horizontal bar enter values in Account Number, Account Name and Currency fields.

Click on Apply button once you fill all the fields as mentioned above. Once the Apply button is clicked new Bank, new Bank Branch and new Bank Account will be created and you will see the Bank Accounts and Assignments form as shown below.

Page 15: r12 Tca Banks

Click on Save button. Once the Save button is clicked the Bank Account just now got created will be assigned to the Supplier ‘P2P GL Dev Team’.

Remember that by performing the above simple steps you have just created a new external Bank, Bank Branch and Bank Account and also you have assigned this new Bank Account to the supplier ‘P2P GL Dev Team’.

Now, let’s have a look at the list of tables impacted after creating the Bank, Bank Branch and Bank Account.

Page 16: r12 Tca Banks

Table HZ_PARTIES

SELECT * FROM hz_parties WHERE party_name = 'P2P CITI Group'

As I mentioned earlier the Bank is also a Party in R12. Hence, the HZ_PARTIES is a master table for the Banks.

SELECT * FROM hz_parties WHERE party_name = 'P2P Tampa'

Again Bank Branch is also a Party in R12. Hence, the HZ_PARTIES is a master table for the Bank Branches.

Page 17: r12 Tca Banks
Page 18: r12 Tca Banks

Table HZ_PARTY_USG_ASSIGNMENTS

SELECT party_id ,party_usg_assignment_id,party_usage_code FROM hz_party_usg_assignments WHERE party_id = 316952;--Party ID of the bank ‘P2P CITI Group’

As I mentioned earlier this table stores the Party Usages. A party can be a Supplier, Customer, Bank, Bank Branch etc. So, this table helps you to find out weather a given Party is a Supplier or Customer or Employee etc. for example, in our case it captures the fact that the given party_id is of type BANK.

Page 19: r12 Tca Banks

SELECT party_id ,party_usg_assignment_id,party_usage_code FROM hz_party_usg_assignments WHERE party_id = 316954;--Party ID of the bank ‘P2P Tampa’

Again, since Bank Branch is also a party there should be a row in the table hz_party_usg_assignemnts which says the Party is Bank Branch.

Page 20: r12 Tca Banks

Table HZ_ORGANIZATION_PROFILES.

SELECT BANK_OR_BRANCH_NUMBER, A.* FROM HZ_ORGANIZATION_PROFILES A WHERE PARTY_ID = 316952 --This is Party ID of the Bank

SELECT BANK_OR_BRANCH_NUMBER, A.* FROM HZ_ORGANIZATION_PROFILES A WHERE PARTY_ID = 316954 --This is Party ID of the Bank Branch

This table stores all the attributes of the Banks and Bank Branches like Bank Name, Bank Number, Branch Name, Branch Number etc. This table will have a separate row for each Bank/Bank Branch.

Page 21: r12 Tca Banks
Page 22: r12 Tca Banks

Table HZ_RELATIONSHIPS

SELECT * FROM HZ_RELATIONSHIPS WHERE SUBJECT_ID IN (316952,316954)

So far you understand that the Banks and Bank Branches are got stored in HZ_PARTIES as the Parties and the Bank and Bank Branch details are stored in HZ_ORGANIZATION_PROFILES table, now you might be wondering that how to link a given Bank to all it’s Branches. You can link the Banks and Bank Branches using the table HZ_RELATIONSHIPS.

In HZ_RELATIONSHIPS table the SUBJECT_ID, OBJECT_ID and RELATION_TYPE columns will help you to link the Banks with their Branches or vice versa.

Page 23: r12 Tca Banks

Table IBY_PMT_INSTR_USES_ALL

SELECT * FROM iby_ext_bank_accounts WHERE bank_account_num = '9988776655' --Bank Account Number we created

Remember in the above steps, after creating new Bank, Bank Branch and Bank Account you have assigned this Bank Account to the Supplier ‘P2P GL Dev Team’. This table stores the information on which Account is assigned to which Supplier/Supplier Site. This table also stores the information on which Account is assigned to which Customer/Customer Sites.

This table is replacement of the 11i table AP_BANK_ACCOUNT_USES_ALL

Page 24: r12 Tca Banks

Summary

By following the various steps above you have done the following.

Created a Supplier called ‘P2P GL Dev Team’

Explored the various tables that got affected after creation of the Supplier

Created a Bank, Bank Branch and Bank Account.

Assigned the Bank Account to the Supplier ‘P2P GL Dev Team’

Explored the tables that got affected after creation of Bank, Bank Accounts and Bank Branches.

Now let’s write a single SQL Query which will return the Supplier details, Supplier Bank Account Number, Bank Account Name, Bank Name, Bank Number, Branch Name, Branch Number etc.

SELECT hzp.party_name vendor_name ,aps.segment1 vendor_number ,hzp.party_number registry_id ,ieba.bank_account_num ,ieba.bank_account_name ,hzp_bank.party_name bank_name ,hop.bank_or_branch_number bank_number ,hzp_branch.party_name branch_name ,hop_branch.bank_or_branch_number branch_number FROM hz_parties hzp ,ap_suppliers aps ,iby_external_payees_all hepa ,iby_pmt_instr_uses_all ipiua ,iby_ext_bank_accounts ieba ,hz_parties hzp_bank ,hz_organization_profiles hop ,hz_parties hzp_branch ,hz_organization_profiles hop_branch WHERE aps.vendor_name = 'P2P GL Dev Team' AND hzp.party_id = aps.party_id AND hepa.payee_party_id = hzp.party_id AND hepa.ext_payee_id = ipiua.ext_pmt_party_id AND ipiua.instrument_id = ieba.ext_bank_account_id AND hzp_bank.party_id = ieba.bank_id

Page 25: r12 Tca Banks

The End

Page 26: r12 Tca Banks

This document was created with Win2PDF available at http://www.win2pdf.com.The unregistered version of Win2PDF is for evaluation or non-commercial use only.This page will not be added after purchasing Win2PDF.