Saturday, 21 February 2026

AP Supplier Bank Accounts At Header Level Report

 AP Supplier Bank Accounts At Header Level Report


SELECT DISTINCT AL1.Vendor_Name,

                AL1.Vendor_Number,

                AL1.Bank_Name,

                AL1.Branch_Name,

                AL1.Bank_Account_Name,

                AL1.Bank_Account_Number,

                AL1.Pay_Group,

                AL1.Account_End_Date,

                AL1.Sup_Hdr_Inactive_Date,

                AL1.Sup_Site_Inactive_Date

  FROM (SELECT SUBSTR ((hrou.NAME), 1, 3)          Company, 

       party_supp.party_name               Vendor_Name, 

       aps.segment1                        Vendor_Number, 

       ass.vendor_site_code                Vendor_Site,

       ass.pay_group_lookup_code           Pay_Group,

       ass.invoice_currency_code           Invoice_Curr, 

       ass.payment_currency_code           Payment_Curr,

--Commented bcz payment method lookup code is only present in interface table

     --  ass.payment_method_lookup_code      Payment_Method,

       party_bank.party_name               Bank_Name, 

       BANK_prof.bank_or_branch_number     Bank_Number,

       party_branch.party_name             Branch_Name, 

       branch_prof.bank_or_branch_number   Branch_Number,

       ieb.bank_account_name               Bank_Account_Name,

       ieb.bank_account_num                Bank_Account_Number, 

       ieb.bank_account_type               Bank_Account_Type,

       ieb.currency_code                   Account_Currency,

       ass.prc_bu_id                          Org_Id,

       ieb.ext_bank_account_id             Bank_Account_Id,

       ieb.branch_id                       Branch_Id,

       ieb.bank_id                         Bank_Id,

       ipi.end_date                        Account_End_Date , 

       aps.end_date_active                 Sup_Hdr_Inactive_Date,

       ass.inactive_date                   Sup_Site_Inactive_Date    

--

FROM   hz_parties                   party_supp, 

       poz_suppliers_v                 aps ,

       poz_supplier_sites_v        ass ,

       iby_external_payees_all      iep ,

      iby_pmt_instr_uses_all       ipi ,

       iby_ext_bank_accounts        ieb ,

       hz_parties                   party_bank ,

       hz_parties                   party_branch ,

       hz_organization_profiles     bank_prof ,

       hz_organization_profiles     branch_prof,

       hr_operating_units           hrou

--

WHERE  party_supp.party_id      = aps.party_id 

AND    ass.vendor_id            = aps.vendor_id 

AND    iep.payee_party_id       = party_supp.party_id 

AND    iep.supplier_site_id     is null

AND    iep.party_site_id        is null

AND    iep.ext_payee_id         = ipi.ext_pmt_party_id 

AND    ipi.instrument_id        = ieb.ext_bank_account_id 

AND    ieb.bank_id              = party_bank.party_id 

AND    ieb.branch_id            = party_branch.party_id 

AND    party_branch.party_id    = branch_prof.party_id 

AND    party_bank.party_id      = bank_prof.party_id 

AND    hrou.organization_id     = ass.prc_bu_id 

--AND    bank_prof.effective_end_date is null

--AND    branch_prof.effective_end_date is null

AND    ass.pay_site_flag        = 'Y'

AND    nvl(ieb.end_date,trunc(sysdate))>= trunc(sysdate)           

AND    nvl(ipi.end_date,trunc(sysdate))>= trunc(sysdate)

) AL1       

 ORDER BY AL1.Vendor_Name

No comments: