CALCULATION BANK CASH DETAILS

hi,
i have a table
CREATE TABLE  "AC_BANK_AMT_DTL"
   (     "S_NO" NUMBER NOT NULL ENABLE,
     "PAYMENT_TYPE" VARCHAR2(20),
     "BANK_NAME" VARCHAR2(500),
     "PAY_TYPE" VARCHAR2(10),
     "CHECK_NO" NUMBER,
     "AMOUNT" NUMBER
        )Here I have deposit 27000 Rs In ICICI BANK BUT i have widraw 1200 RS. and in STATE BANK OF INDIA i have deposit 46000 RS But there is no widraw Transaction So it should be show 46000 Rs.
1     DEPOSIT     STATE BANK OF INDIA        CASH      -           12000
2     DEPOSIT     ICICI BANK                 CASH     -              15000
3     WIDRAW     ICICI BANK                CHECK     1616              1200
4     DEPOSIT     ICICI BANK                CASH     -           12000
5     DEPOSIT     STATE BANK OF INDIA       CHECK     1234           34000Now i Want to show Current Cash Details According to Bank.
Like above
Result Should BE
STATE BANK OF INDIA --46000
ICICI BANK -------------------25800 
NOTE :-27000-1200=25800 ICICI BANKI am using
select bank_name ,(select sum(amount) from AC_BANK_AMT_DTL where PAYMENT_TYPE ='DEPOSIT')-(select sum(amount) from AC_BANK_AMT_DTL where PAYMENT_TYPE ='WIDRAW') from AC_BANK_AMT_DTL  group by bank_name order by bank_name Thanks
Manoj KAushik

Try this:
WITH ac_bank_amt_dtl AS
(SELECT 'DEPOSIT' payment_type, 'STATE BANK OF INDIA' bank_name, 12000 amount FROM dual UNION ALL
SELECT 'DEPOSIT' payment_type, 'ICICI BANK' bank_name, 15000 amount FROM dual UNION ALL
SELECT 'WIDRAW' payment_type, 'ICICI BANK' bank_name, 1200 amount FROM dual UNION ALL
SELECT 'DEPOSIT' payment_type, 'ICICI BANK' bank_name, 12000 amount FROM dual UNION ALL
SELECT 'DEPOSIT' payment_type, 'STATE BANK OF INDIA' bank_name, 34000 amount FROM dual)
SELECT   bank_name,
         SUM(CASE payment_type
             WHEN 'DEPOSIT' THEN amount
             WHEN 'WIDRAW' THEN -amount
             END) balance
FROM     ac_bank_amt_dtl
GROUP BY bank_name

Similar Messages

  • Bank statement detail report in cash management

    Iam able to see all ap payment numbers in " transactions available for reconciliation report" but some of them are missing in bank statement detail report.
    Do anyone have any idea on this? pls suggest.

    These reports have different roles:
    Bank Statement Detail Report
    This report shows statement and transaction information for a specific bank account statement, including bank statement header information, statement line detail, and reconciled transaction detail. This report lists any unreconciled transactions separately with their current status, and the statement totals for each type of transaction, including the amount entered, reconciled, unreconciled and over-reconciled. Under-reconciled amounts are displayed as a negative amount in the over-reconciled column. You also have the option to run the report for only unreconciled statement lines.
    Transactions Available for Reconciliation Report
    This report shows all transactions available for reconciliation for a specific bank account. It lists detailed transaction information for your Available Receipts, Available Payments, and Available Journal Entries for reconciliation. Detailed information includes the Customer, Supplier, Transaction Date, Payment Method, Transaction Number, Currency, and Amount. It also lists detailed information for your available statement lines.
    This report only lists void payments if the Show Void Payments option on the Systems Parameters window is checked.
    Octavio

  • Duplicate Supplier Bank Account Details

    Hi Friends,
    I am an Oracle Finance Functional Consultant. I got into an issue i regards to Duplicate supplier bank account details. While making payment to on of the suppliers through payment workbench in Oracle Payables, under remit-to account number field, i can see 2 account numbers xxxxx1234 and xxxxx1234 out of which, i understood that one is a duplicate account number. So, can someone please help me deleting that duplicate account.
    Thanks in advance..
    Regards,
    Venkat

    Hi Raju,
    Thanks for your valuable time and reply. I checked the document on cash management. But, unfortunately didn't find any information required. Actually, there are 2 supplier bank accounts created through "Bank Details" option in Oracle Payables.
    Example:
    for Dallas (supplier site) : xxxxx1234 (A/c number)
    for Chicago (supplier site): xxxxx3456 (A/c number)
    so, in payment workbench, if i select the supplier site as Dallas, then i can see xxxxx1234 twice in the LOV under Remit-to account number field.
    And if i select the supplier site as Chicago, then i can see xxxxx3456 twice in the LOV under Remit-to account number field.
    I am not able to understand why the account number is getting doubled. Can you please help me understanding the reason behind this doubling of account numbers.
    Regards,
    Venkatesh

  • Update supplier bank account details using open Interface

    In R12, how do you update/create the supplier bank accounts for existing supplier and supplier site? Is it correct that the bank account details cannot be
    imported individually and it can only be imported along with the supplier or supplier site? Please provide the steps if we can update the bank account details (like the import program and all that?)
    Thanks in advance!
    -Shirish

    One of the reason of this error is incorrect object_version_number. In API iby_ext_bankacct_pub.update_ext_bank_acct there is a parameter p_ext_bank_acct_rec, in this record type one field is object_version_number. Pass the correct version number which is same as for the given bank account.
    Below is the query to find the correct object_version_number --
    SELECT object_version_number
    FROM IBY_EXT_BANK_ACCOUNTS
    WHERE ext_bank_account_id = <bank_account_id>;
    Thanks,
    PC

  • How can I change my bank account details on iCloud ?? I have been sent instructions via email from Apple but they don't appy ? Can anyone help ? Thanks in advance

    How can I change my bank account details on iCloud ?? I have been sent instructions from Apple via email and they don't appy ?? Can anyone help ? Thanks in advance

    You have to change it using iTunes on your computer, as explained here: Change or remove your payment information from your iTunes Store account (Apple ID) - Apple Support.  (This article: iCloud: View or change your iCloud payment information no longer works with iOS 8 or Yosemite.)

  • HT3702 I am unable to add my bank/card details in my apple account, every time i am getting a message that it has been declined. kindly help me in authorise my bank card in my apple account i need to purchase few apps, pls help me

    Hi,
    I am unable to add my bank/card details in my apple account, every time i am getting a message that it has been declined. kindly help me in authorise my bank card in my apple account i need to purchase few apps, pls help me

    What sort of card are you trying to use ? If it's a debit card then I don't think that they are still accepted as a valid payment method - they are not listed on this page and there have been a number of posts recently about them being declined
    If it's a credit card then is it registered to exactly the same name and address (including format and spacing etc) that you have on your iTunes account, it was issued by a bank in your country and you are currently in that country ? If it is then you could check with the card issuer to see if it's them that are declining it, and if not then try contacting iTunes support and see if they know why it's being declined : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management

  • Profit Center : Reflect - Vendor, Customer, Bank/Cash Balance

    Dear Experts,
    Ref. : Reflect - Vendor, Customer, Bank/Cash Balance, Balance Sheet GL Accounts - Profit Center wise.
    When we do postings to P&L Items, we assign a CO / Cost Object. Such Cost objects may be Orders, Cost Centers, etc., which has a Profit Center assigned to it.
    Now, we wish to view Balance Profit Center wise.
    My Concerns :
    1.  Can Vendor, Customer, Bank/Cash Balance, Balance Sheet GL Accounts - Profit Center wise. Since we do not assign CO objects to such line items, but the correspondense line items (P&L GL) has a CO object.
    2.  If yes, how do we move balance of such items, to Profit Center / profit Center wise.
    Experts, please help me to understand the concept.
    Regards,
    Hussein.

    Hi,
    Are you in ECC activated new G/L? If yes, then you can define Profit Center as Document Splitting Characteristic for General Ledger and profit center will be in the AR/AP line item as well in ledger view (though you don't enter profit center during document entry).
    You cannot give the Profit center in line item level to the Subledger accounts like vendor and customers.Vendor and customer accounts take the profit center from the offsetting entry.If want to see the profit center to the particular document, open the document go to Environment field and select Balance Sheet Adjustment option.
    If you want to see the Profit center wise payables and receivables, use T.code GR55 and take report group 8A90 for Periodic Receivables and 8A91 for Payable.
    If you want to see the all payables with Profit center use Table BFOK_A for vendors BFOD_A for customers.
    Regards,
    Viswa

  • Bank Account Details to be Mandatory

    Hi,
    I am a FI consultant and as per client requirement,
    In Vendor master, " Bank Account details to be made mandatory'.
    Could u please guide me how to configure ?
    thanks
    JK

    Hi JK,
    Please go thru SDN and regarding 'Screen Varaint' previously I have given one exaample.
    Do as per following procedure
    I am giving procedure and steps here.
    Screen variants allow you to simplify screen editing by:
    You can insert default values in fields
    Hiding and changing the ready for input status of fields
    Hiding and changing the attributes of table control columns
    A screen variant contains field values and attribute for exactly one
    screen. A screen variant may be assigned to multiple transaction
    variants
    Example:
    Assume: In XK01 Vendor master creation, business wants the 'Bank Details' fields to be made 
    Manadatory (Required fileds).
    1). Click on F1 in the Bank details field and in technical info, note
    down the 'program' and screen in 'screen data area
    2).Goto T-Code SHD0 and enter the t-code, and in screen variant tab, enter
    the name of the screen variant. Enter the "program name" and "screen number".
    By entering this, we can save time by directly going to that particular
    screen, otherwise, system would take through all available program and
    screen numbers for the t-code.
    Click on, u201CCreateu201D
    3).Next, youu2019ll get this XK01 - Bank Details screen, double click on u201CBank detailsu201D, before that empty the field data
    4).Youu2019ll get the screen, here you can see that, the screen variant
    Name is shown, select u201CRequired Onlyu201D option against the u201CDiffernet fields of Bamk Details (Select fields as per your requirement)
    Field. Also select copy settings checkbox. Click u201CExit and Saveu201D button
    5). Next, youu2019ll get one more screen, if you want, enter some short text for the
    Screen variant, then click on save.
    6).A popup window will come, asking for package details. Please get package deatils from your ABAPer, (You can get package details from SE93, there you mention in T.code field "MRIO" -> Display then you will get Package details as "MRM" this standard SAP package.if you have given this package name here, whenever you are going for upgradation, some queries will come. Hence check with your ABAPer and do according his / her suggestion.)
    7).Come back and click on the transaction variant tab, enter a name for
    the transaction variant. You can many number of screen variant to a transaction variant.
    8).Click on u201CInsert Rowu201D and enter the screen variant name which was
    created
    9).Enter the name and click on the u201CFloppy disk-Saveu201D button
    10.)If we goto XK01-Bank Details, still the Bank details will be in optional mode
    11).Goto Standard Variant tab and enter the transaction variant name,
    Click on the u201CActivateu201D button
    12).Now, when we goto XK01-Bank details, we can see that the u201CBank details fields
    has been made as required only
    System Required Request and please remember you have to give "WORKBENCH REQUEST ONLY"
    Hope it is clear
    Thanks and regards,
    Vijay

  • Onetime vendor bank account details

    Hi,
    When entering Name and Address details for a onetime vendor, the Bank Key and Bank Account fields can also be entered. Our auditors are in a flap that anybody who has access to create invoices using a onetime vendor, can enter in bank details (possibly there own).
    They would like to limit the access of the Bank Account details on the input screen so that only certain users can enter these details.
    Is there any way to disable some fields on this screen, or have some sort of authority check before this screen is displayed, so that only certain users would be able to input or change these fields?
    Thanks,
    Michael.

    Create authorization objects/groups. you may ask your basis for this as well.

  • Bank account details

    how do i change my bank account details for my direct debit for my sim only plan?

    Hi there jeni24
    Just need to ring Customer Care and they will change all your details.
    -Kyle

  • Payee Bank Account Details

    Hi Experts,
    I am developing a report of remittance advice in R12.
    in that i need payee bank account details(payee bank account number, Payee branch number).
    in front end navigation was
    payables resp-->suppliers-->entry
    in supplers query i queried for any supplier and went to banking details
    here i am seeing branch number and account number fields.
    Could you please tell me which tables store these two fields(branch number and account number of supplier form).
    Thanks
    Ashok
    Edited by: 886640 on Nov 23, 2011 4:27 AM

    Hi experts,
    for supplier detail i am running the following query but output is zero rows.
    please guide me to move forward.
    SELECT party_supp.party_name supplier_name
    , aps.SEGMENT1 supplier_number
    , ieb.BANK_ACCOUNT_NUM bank_account_num
    , branch_prof.BANK_OR_BRANCH_NUMBER branch_number
    FROM hz_parties party_supp
    , ap_suppliers aps
    , hz_party_sites site_supp
    , ap_supplier_sites_all 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
    WHERE 1=1
    AND party_supp.PARTY_ID=aps.PARTY_ID
    and party_supp.PARTY_ID=site_supp.PARTY_ID
    AND site_supp.PARTY_SITE_ID=ass.PARTY_SITE_ID
    AND ass.VENDOR_ID=aps.VENDOR_ID
    AND iep.PAYEE_PARTY_ID=party_supp.PARTY_ID
    AND iep.PARTY_SITE_ID=site_supp.PARTY_SITE_ID
    AND iep.SUPPLIER_SITE_ID=ass.VENDOR_SITE_ID
    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

  • Bank chain details in REGUH via F110

    Hi guys,
    where does the bank chain details in REGUH table via F110 are coming from?
    Thanks a lot!
    Rgds,
    Mark

    Hi Mark,
    I am sorry for not understanding your query completely, as your first query is somewhat different than the recent one. However, if the question is for Configuring, you can do that from the following path :
    Financial Accounting -> Bank Accounting -> Define Scenario (TCode FIBC)
    Then Activate the Bank Chain. Please check this path and go through the IMG Activity Documentation for more details.
    Please let me know, if I am mistaken.
    Thank you.
    Suresh Jayanthi.

  • If I take my bank card details off my itunes account and opened a new itunes account what would happen to the old account?

    If I take my bank card details off my itunes account and opened a new itunes account what would happen to the old account?

    you're more likely to get quick and accurate answers to an iTunes question in the iTunes forum, this is the GarageBand forum

  • If I take my bank card details off my itunes account and open a new itunes account what will happen to the old account?

    If I take my bank card details off my itunes account and open a new itunes account what will happen to the old account?

    you're more likely to get quick and accurate answers to an iTunes question in the iTunes forum, this is the GarageBand forum

  • My app market isn't reconising my bank account details, it say for assistence contact support please help

    my app market isn't reconising my bank account details when i try and purchase a app , it say for assistence contact support please help

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

Maybe you are looking for