Tuesday, 5 May 2015

R12 Internal Bank Details query

SELECT hou.NAME                        "OPERATING UNIT",
       cbbv.bank_name,
       cbbv.bank_branch_name,
       cba.bank_account_name,
       hp.party_name                   "LEGAL ENTITY",
       cbau.ar_use_enable_flag         "RECEIVABLES_ACCOUNT_USE",
       cbau.ap_use_enable_flag         "PAYABLES_ACCOUNT_USE",
       cba.bank_account_num            "ACCOUNT_NUMBER",
       cba.bank_account_type           "ACCOUNT TYPE",
       cba.iban_number,
       cba.currency_code,
       cba.multi_currency_allowed_flag,
       cba.description,
       gcck1.concatenated_segments     "CASH ACCOUNT",
       gcck2.concatenated_segments     "BANK_CHARGES_ACCOUNT",
       gcck3.concatenated_segments     "FOREIGN_EXCHANGE_CHARGES",
       gcck4.concatenated_segments     "CASH_CLEARING_ACCOUNT",
       gcck5.concatenated_segments     "BANK_ERRORS_ACCOUNT",
       gcck6.concatenated_segments     "FUTURE_DATED_PAYMENT_ACCOUNT",
       cba.ap_amount_tolerance         "PAYMENT_TOLERANCE_AMOUNT",
       cba.ap_percent_tolerance        "PAYMENT_TOLERANCE_PERCENTAGE",
       cba.ar_amount_tolerance         "RECEIPT_TOLERANCE_AMOUNT",
       cba.ar_percent_tolerance        "RECEIPT_TOLERANCE_PERCENTAGE",
       cba.ce_amount_tolerance         "CASHFLOW_TOLERANCE_AMOUNT",
       cba.ce_percent_tolerance        "CASHFLOW_TOLERANCE_PERCENTAGE",
       cba.recon_oi_amount_tolerance   "OPEN_INT_TOLERANCE_AMOUNT",
       cba.recon_oi_percent_tolerance  "OPEN_INT_TOLERANCE_PERCENTAGE",
       gcck7.concatenated_segments     "ON_ACCOUNT_ACCOUNT",
       gcck8.concatenated_segments     "UNAPPLIED_ACCOUNT",
       gcck9.concatenated_segments     "UNIDENTIFIED_ACCOUNT",
       gcck10.concatenated_segments    "ASSET_ACCOUNT",
       gcck11.concatenated_segments    "REMITTANCE_ACCOUNT",
       gcck12.concatenated_segments    "RECEIPT_CLEARING_ACCOUNT"
  FROM ce_bank_accounts         cba,
       ce_bank_acct_uses_all    cbau,
       ce_gl_accounts_ccid      cgac,
       ce_bank_branches_v       cbbv,
       hr_operating_units       hou,
       hz_parties               hp,
       gl_code_combinations_kfv gcck1,
       gl_code_combinations_kfv gcck2,
       gl_code_combinations_kfv gcck3,
       gl_code_combinations_kfv gcck4,
       gl_code_combinations_kfv gcck5,
       gl_code_combinations_kfv gcck6,
       gl_code_combinations_kfv gcck7,
       gl_code_combinations_kfv gcck8,
       gl_code_combinations_kfv gcck9,
       gl_code_combinations_kfv gcck10,
       gl_code_combinations_kfv gcck11,
       gl_code_combinations_kfv gcck12
 WHERE cbbv.bank_party_id = cba.bank_id
   AND cbbv.branch_party_id = cba.bank_branch_id
   AND cba.bank_account_id = cbau.bank_account_id
   AND cgac.bank_acct_use_id = cbau.bank_acct_use_id
   AND cbau.org_id = hou.organization_id
   AND hp.party_id = cba.account_owner_party_id
   AND gcck1.code_combination_id = cgac.ap_asset_ccid
   AND gcck2.code_combination_id = cgac.bank_charges_ccid
   AND gcck3.code_combination_id = cba.fx_charge_ccid
   AND gcck4.code_combination_id = cgac.cash_clearing_ccid
   AND gcck5.code_combination_id(+) = cgac.bank_errors_ccid
   AND gcck6.code_combination_id(+) = cgac.future_dated_payment_ccid
   AND gcck7.code_combination_id = cgac.on_account_ccid
   AND gcck8.code_combination_id = cgac.unapplied_ccid
   AND gcck9.code_combination_id = cgac.unidentified_ccid
   AND gcck10.code_combination_id(+) = cgac.asset_code_combination_id
   AND gcck11.code_combination_id = cgac.remittance_ccid
   AND gcck12.code_combination_id = cgac.receipt_clearing_ccid

3 comments:

  1. You need to add the following line to make your query perfect!

    AND gcck12.code_combination_id = cgac.receipt_clearing_ccid

    Enjoy!

    ReplyDelete
  2. Thank You and that i have a super supply: What Renos Add Value home renovation quotes

    ReplyDelete

Query to Find Receipt Class and its GL Combinition Query

SELECT ARC.NAME ReceiptClass,        ARC.CREATION_METHOD_CODE Creation_Mehthod,        DECODE (ARC.REMIT_METHOD_CODE,             ...