You are on page 1of 2

IBY_EXTERNAL_PAYEES_ALL : supplier information and customer information IBY_EXT_BANK_ACCOUNTS : external bank account information IBY_PMT_INSTR_USES_ALL : Payment instruments assignments

AP_SUPPLIERS : Stores Supplier Information AP_SUPPLIERS_SITES_ALL : Stores Supplier site Information Query:

SELECT /*Supplier Information*/ aps.segment1 ,aps.vendor_id ,aps.vendor_name ,aps.party_id ,iepa.remit_advice_fax ,iepa.remit_advice_email /* Supplier Site Information */ ,assa.vendor_site_id ,assa.party_site_id ,assa.vendor_site_code ,assa.pay_site_flag ,assa.purchasing_site_flag ,assa.rfq_only_site_flag /* Bank Information*/ ,ieba.ext_bank_account_id ,hp.party_name ,ieba.bank_account_num ,ieba.bank_account_name ,ieba.country_code ,ieba.currency_code /* Bank Address */ ,hp.address1 ,hp.address2 ,hp.address3 ,hp.city ,hp.state ,hp.postal_code ,hp.country /* Bank Branch Address */ ,hp1.address1 ,hp1.address2 ,hp1.address3 ,hp1.city ,hp1.state ,hp1.postal_code ,hp1.country ap_supplier_sites_all ,hz_parties ,iby_ext_bank_accounts ,iby_external_payees_all ,iby_pmt_instr_uses_all ,ap_suppliers ,hz_parties assa.vendor_site_id = hp.party_id = ipiua.instrument_id = ipiua.ext_pmt_party_id = oracle_supplier_number supplier_name supplier_party_id remit_advice_fax remit_advice_email supplier_party_site_id vendor_site_code pay_site_flag purchasing_site_flag rfq_only_site_flag Bank_party_name bank_account_num bank_account_name bank_acct_country_code bank_acct_currency_code bank_address_line1 bank_address_line2 bank_address_line3 bank_address_city bank_address_state bank_address_zip bank_address_country branch_address_line1 branch_address_line2 branch_address_line3 branch_address_city branch_address_state branch_address_zip branch_address_country assa hp ieba iepa ipiua aps hp1 iepa.supplier_site_id ieba.bank_id ieba.ext_bank_account_id iepa.ext_payee_id

FROM

WHERE AND AND AND

AND AND AND AND AND

assa.vendor_id ieba.branch_id ipiua.instrument_type ipiua.payment_flow ipiua.order_of_preference

= = = = =

aps.vendor_id hp1.party_id 'BANKACCOUNT' 'DISBURSEMENTS' 1;

Employee as a supplier Bank details SELECT aps.vendor_id, apss.vendor_site_id, aps.vendor_name, apss.vendor_site_code, ieb.bank_name, ieb.country, iebb.bank_branch_name, iebb.eft_swift_code, iebb.branch_number, ieba.bank_account_num, ieba.bank_account_name, iban FROM ap.ap_suppliers aps, per_all_people_f papf, ap.ap_supplier_sites_all apss, apps.iby_ext_bank_accounts ieba, apps.iby_account_owners iao, apps.iby_ext_banks_v ieb, apps.iby_ext_bank_branches_v iebb WHERE aps.vendor_id = apss.vendor_id AND iao.account_owner_party_id = aps.party_id AND ieba.ext_bank_account_id = iao.ext_bank_account_id AND ieb.bank_party_id = iebb.bank_party_id AND ieba.branch_id = iebb.branch_party_id AND ieba.bank_id = ieb.bank_party_id AND aps.employee_id = papf.person_id AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date

Supplier Bank details (Not an Employee)

SELECT aps.vendor_id, apss.vendor_site_id, aps.vendor_name, apss.vendor_site_code, ieb.bank_name, ieb.country, iebb.bank_branch_name, iebb.eft_swift_code, iebb.branch_number, ieba.bank_account_num, ieba.bank_account_name, iban FROM ap.ap_suppliers aps, ap.ap_supplier_sites_all apss, apps.iby_ext_bank_accounts ieba, apps.iby_account_owners iao, apps.iby_ext_banks_v ieb, apps.iby_ext_bank_branches_v iebb WHERE aps.vendor_id = apss.vendor_id AND iao.account_owner_party_id = aps.party_id AND ieba.ext_bank_account_id = iao.ext_bank_account_id AND ieb.bank_party_id = iebb.bank_party_id AND ieba.branch_id = iebb.branch_party_id AND ieba.bank_id = ieb.bank_party_id