Supplier Site bank information

Supplier Site bank information

In this blog post, we'll provide a simple SQL query to quickly retrieve supplier site bank details from Oracle EBS Payables. This straightforward query will help streamline your development process by allowing you to easily fetch essential information like bank name, account number, branch code, and more for each supplier site.

SELECT sup.segment1,
       sup.vendor_name,
       sups.vendor_site_code,
       sups.address_line3,
       sups.address_line2,
       sups.address_line1,
       eba.iban,
       sup.employee_id,
       (SELECT distinct (prt_owner.party_name)
          FROM iby_account_owners aos_owner, 
               iby_external_payees_all epa_owner, 
               hz_parties prt_owner
         WHERE aos_owner.ext_bank_account_id = eba.ext_bank_account_id
           AND aos_owner.primary_flag = 'Y'
           AND aos_owner.account_owner_party_id = epa_owner.payee_party_id
           AND epa_owner.payee_party_id = prt_owner.party_id) owner,
       branchparty.country,
       branchparty.party_name,
       eba.country_code,
       eba.branch_id,
       eba.ext_bank_account_id
  FROM iby_pmt_instr_uses_all  piu,
       iby_external_payees_all epa,
       iby_ext_bank_accounts   eba,
       Ap_Supplier_Sites_All   sups,
       ap_suppliers            sup,
       hz_parties              branchparty
 WHERE piu.payment_flow = 'DISBURSEMENTS'
   AND piu.ext_pmt_party_id = ext_payee_id
   AND epa.supplier_site_id IS NOT NULL
   AND piu.instrument_id = eba.ext_bank_account_id
   and epa.supplier_site_id = sups.vendor_site_id
   and sups.vendor_id = sup.vendor_id
   and eba.branch_id = branchparty.party_id
 order by eba.last_update_date desc;