Which SQL table holds opening balance?

Dear all,
I want to use crystal report to draw financial information directly from SQL database.
However, I don't know which SQL table stores the open/ending balance of account item
of a given period.
Any one can help?
Norman.

Dear Gordon,
So how is the calculation? Below is my guess. Please comment.
For example, opening balance of account 1234 is $100DB.
If I want to find opening balance of account 1234 as at period 2.
Summing up all journal entries in period 1 to find the total debit/credit.(for example : $150DB)
And add up the two ($100DB + $150DB) to get $250DB.
This is the opening balance of account 1234 as at period 2.
For opening balance as at period 3, sum up all journal entries in period 1 and 2.
Add the result to opening balance.
Please comment.
I wonder if SDK DI has any COM object to get the result directly.
Thanks.
Norman.

Similar Messages

  • PO Authorization Limits - Which SQL Tables?

    Dear All - I'm fairly new to forums - so firstly let me apologise if this message has gone into the wrong section.  I am primarily seeking information about SAP SQL tables.
    I have been asked to analyse PO's raised by employees over a period of time.  The business wants to assess how often authorization limits (spending) are breached by employees splitting invoices against the same supplier. 
    I am using Intellicorp's 'Live Compare' product to extract data from the SQL Server database.  Whilst I am well versed with PO header and detail EKKO and EKPO - I am ignorant of which SQL tables I need to establish PO authorisation limits for a user.  I have spent a lot of time trying to find information without success.  I've also used DD02 and DD03 to try to establish the relationships but without success.  Can anyone help?
    Most resources I've found speak in terms of authorisation profiles (configuration) but I don't have access to the SAP front end, as the external auditor I can only see the SQL data.  My goal would be to automate the extraction of PO value authorisation limits.  But first I need to understand the table structure.  If anyone can point me in the right direction, I would be grateful.
    I've found one other post - a person seeking the exact same information but to date he's had no reply.  This gentleman has raised his query in governance, risk and compliance.  Authorization Limits
    If I get a reply - I will make sure he receives it also.
    Many thanks for reading my post.

    > I might take an extract of all the Invoice table and run fuzzy matching criteria on the PO reference or the Vendor Name.  It is extremely effective and the only way to get 100% coverage.  Sitting with a user would in no way give me the data I need, as in this case there are several different users and the objective would be to recover money for the client.  Don't be alarmed, this isn't in breach of compliance regulations.  The data isn't changed or manipulated in any way, only analysed outside of the production environment like a report.
    Hmm... then why won't you just do it in a proper ABAP report?
    Everything you asked for is there. The full data access, the data dictionary.
    You wouldn't have to "sit with the users" - I clearly wasn't talking about using the standard front-end tools
    Still - the far I've been in touch with getting systems "audit proove" it was all about ensuring that nobody could possibly change the data unnoticed.
    So to me it just looks like a big fat security whole to say: "Ok, for the auditors we let go all of the permission and technical auditing stuff and just hand them over all data".
    And that would be exactly what you do when you access the tables directly.
    One example: say, there is production data of multiple clients in a ERP system.
    You're working just for one of them...
    So how can you guarantee that you cannot access the other clients data (besides promising no to do that)?
    > I do appreciate that the application gives the context to the data - but with a technical manual and a bit of help from the client we would normally be able to extract what is required from the database and use it to discover things about the system that could not be discovered in most other ways - in this case I'm only looking to find the table(s) and relationships which would allow me to determine the users PO authorisation limits.  At the moment, I've not been able to find anything that is detailed enough to help me in this regard.  Maybe this information just isn't available but it's principally why I'm posting.
    This information is available.
    The ABAP stack is a open source system - you can view all coding and data definitions if you like.
    Since I'm no application expert, I cannot tell you whether there are already reports doing what you want to do, but I would be surprised if there weren't any.
    So maybe you want to post this question in the application forum instead?
    regards,
    Lars

  • ABAP MM: In ME21N which internal table holds Actual Price (Including Taxes)

    Using tcode  ME21N, while creating new PO, which internal table holds Actual price (Including Taxes) of whole PO (not by item) , assuming PO is not saved.
    In the program, I want to capture the total cost of whole PO including taxes as soon as user enter the items. So that I can make some processing according to the total amount of PO.
    Thanks,

    Check the internal table lt_mepoaccounts field netpr.

  • Table for Opening Balance

    Hi,
    In which tables i can see the data of Opening Balance, closing Balance,
    Ord Dep, Transfers, retirments etc. All this fields are there in AR02 (Asset history sheet)
    report.
    regards
    VEnk@

    No response.

  • Which SD Table holds the Technical Object Information?

    I am writing a report in SQ01 and can't find an SD table holding the technical objects information from the Sales contracts or orders. Can anyone suggest a table or which tables to joins I need. .
    Thanks
    Jen

    .... also:
    inner join with sales ordem item:
    VBPM-VBELN = VBAP-VBELN
    VBPM-POSNR = VBAP-POSNR
    Available fields:
    Technical reference object type
    Technical reference object
    Serial number

  • G/L Acc  Opening Balances.............

    Hi  ........
      I am working on ECC 6.0 . I am developing a report which will fetch the opening balance for the starting date in given select options and closing balance for last date in given select options and need to show all the Dr , Cr  transactions between these dates for given G/L Account...
    Plz help in solving this...
    I am using FAGLFLEXT Table

    How can i use BAPI...
    PLZ Check is it right way....
    Plz tell if any Mistakes
    REPORT  ZFIIN_REP_OPENINGBAL.
    TABLES : FAGLFLEXT,BSIS.
    data : ret like bapireturn ,
           L_FISCAL_YEAR LIKE  BAPI0002_4-FISCAL_YEAR ,
           L_FISCAL_PERIOD LIKE  BAPI0002_4-FISCAL_PERIOD ,
           FIRST_DAY   LIKE  BAPI0002_4-POSTING_DATE ,
           BALANCE_CARRIED_FORWARD LIKE  BAPI3006_4-BALANCE.
    data : AC_BAL type standard table of   BAPI3006_4 with header line.
    parameters : CCODE LIKE  BAPI0002_2-COMP_CODE ,
                 GLACCT LIKE  BAPI3006_0-GL_ACCOUNT,
                 CURRTYPE LIKE  BAPI3006_5-CURR_TYPE.
    select-options : PDATE for  sy-datum .
    CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
    EXPORTING
    COMPANYCODEID = CCODE
    POSTING_DATE = PDATE-low
    IMPORTING
    FISCAL_YEAR = L_FISCAL_YEAR
    FISCAL_PERIOD = L_FISCAL_PERIOD.
      WRITE  : /10 L_FISCAL_PERIOD , 30 L_FISCAL_year .
    CALL FUNCTION 'BAPI_CCODE_GET_FIRSTDAY_PERIOD'
       EXPORTING
         COMPANYCODEID             = CCODE
         FISCAL_PERIOD             = L_FISCAL_PERIOD
         FISCAL_YEAR               = L_FISCAL_year
      IMPORTING
        FIRST_DAY_OF_PERIOD       = FIRST_DAY
       RETURN                    = ret
       WRITE  : /10 FIRST_DAY  .
       CALL FUNCTION 'BAPI_GL_ACC_GETPERIODBALANCES'
         EXPORTING
           COMPANYCODE                   = CCODE
           GLACCT                        = GLACCT
           FISCALYEAR                    = L_FISCAL_year
           CURRENCYTYPE                  = CURRTYPE
        IMPORTING
          BALANCE_CARRIED_FORWARD       = BALANCE_CARRIED_FORWARD
         RETURN                        = ret
         TABLES
           ACCOUNT_BALANCES              = AC_BAL
    loop at ac_bal.
    write : /10 ac_bal-COMP_CODE  ,
          30  ac_bal-GL_ACCOUNT  ,
         50 ac_bal-FISC_YEAR ,
         70 ac_bal-FIS_PERIOD  ,
        90  ac_bal-DEBITS_PER ,
        110  ac_bal-CREDIT_PER ,
        134  ac_bal-PER_SALES      ,
        150  ac_bal-BALANCE     ,
        170  ac_bal-CURRENCY ,
        190  ac_bal-CURRENCY_ISO .
    endloop.
      if ret-type = 's'.
        message i001(zfi01).
    else.
    message i002(zfi01).
       endif.

  • How to calculate open balance Vendor Line Item Display(FBL1N)..?

    hi,
    is there any way to fetch data for open balnce in vendor report display(FI).
    As I have to calculate Credit , Debit and Open balace , also Balance  as on date. in Zreport with reff of FBL1N.
    Vendor item data has been calculated from BSIk table. also  open balance has to be fetched from with reference of Clearing doct and posting doct. i have
    so if any FI technical or non techincal person has gone thru these things, those who have clear picture on these plese let me know.
    Thnks in advance.

    Please note that most vendor line items wont have a PC assigned to them.
    I am not sure if you are refering to classic view or new GL data.
    Anyway you can use the sum button, and sub total for your levels.
    If you want to get the information sub totalled by PC, then I guess you are using the new GL and document splitting.
    If that is the case you cannot use FBL1N for this.
    There is however a set of reports in Accounts Payable, called new Gl reports and they will provide you the general ledger view and not the entry level view, and you can use the sum and sub total option.
    Please award points if this is useful.
    Come back if you need further help.

  • Supplier Opening Balance Account wise

    Hi Team
    I would like to design a report which prints the Supplier Opening Balance Account wise along with the Total of Debits and Total of Credits for the Account selected.
    Example
    If user selects the Account Segment value : 142100 the report should display all the Suppliers corresponding to this Account code with Total of Debits and Total of Credits.
    Please help me.
    Regards
    Nakul Venkatraman

    HI Nakul  , 
    will this query be useful  ?
    select pov.VENDOR_NAME,gb.BEGIN_BALANCE_CR_BEQ,gb.BEGIN_BALANCE_DR_BEQ
    from po_vendors pov, gl_balances gb
    where pov.ACCTS_PAY_CODE_COMBINATION_ID = gb.CODE_COMBINATION_ID
    and pov.ACCTS_PAY_CODE_COMBINATION_ID = :bind_variable
    Thanks&Regards
    [email protected]

  • Regarding Import opening balance for GL  using DTW

    Can you give me a  template  example?
    and I should use which objects to Import  opening balance?
    Thank you

    Thank you for your prompt reply.
    I have imported the opening balance  to system successfully.
    using the DTW:
    In addtion I import the opening balance and other BP and stock balance ,I want to konw which column( for instance DueDate
    ReferenceDate or  anything else) to deciede to the journal entry in which posting period.
    Perhaps I could change the server datetime...
    Please advise ! thank you !

  • SQL table for Package Status history

    Anyone know which SQL table stores the history for non-scheduled packages? I know tblScheduleHistory stores scheduled jobs but can't locate the history seen using "Package Status". This is for 5.0 SP2

    Please try tblDTSlog table

  • Reg-Opening balances

    Dear all
    In my client place I have created Opening balaces(debtors) & Opening stock a/c under assests head,Opening balances(creditors) under Liabilities head.P&L a/c under equity head.
    Now I have posted opening balances in to this accounts but to nullfy this accounts should i pass journal entry like as below
    Opening balances (creditors)   Dr   100000
    Opening balances (creditors)                        100000
    or
    P&L account   Dr 100000
    Opening balances(creditors)   100000
    Please kindly suggest the correct and best way.
    Regards
    M Auditya

    Hi Auditya
    Go to
    Administration -
    > System Initilation -
    > Opening Balances.
    Select G/L Opening Balance or Business Partner Opening Balance according to your requirement.
    in opening Balance account
    select G/L Opening Balace Acct if it is a G/L opening Balace
    select BP  Opening Balace Acct if it is a BP  opening Balace
    Select Acct to which you are entering opening Balances.
    If it is Debit enter in +ve Value
    If it is Credit enter in -ve Value
    I think it will help you
    Regards
    Siva Reddy

  • Possibility to show opening balance of a GL account through SQL query?

    Hi experts,
    Is it possible to run an SQL query in SBO that shows the opening balance
    of a GL account based on a date entered by the user?
    This is similar to how the general ledger shows the opening balance of a GL account based on the posting dates entered.
    Thanks for your ideas.

    Hi Gordon,
    Thanks for that idea.
    I am thinking of the following:
    1. Create a virtual table (#TEST) from a SELECT statement that gets all journal entries for the specified GL account BEFORE the specified posting date.
    2. Perform a SELECT statement that sums the debit and credit from (#TEST).
    This should show the opening balance of the GL account right?
    Regards,
    Eric
    Edited by: eceguerra on May 18, 2011 7:02 AM
    Edited by: eceguerra on May 18, 2011 7:02 AM

  • AR Open Balances ~java.sql.SQLException: No corresponding LOB data found

    Dear all,
    Please gudie me to solve this error..
    OPP.log file
    [10/24/12 12:16:18 PM] [UNEXPECTED] [82244:RT2787964] java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA,DBMS_LOB.GETLENGTH(L.FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGUAGE DEFAULT_LANGUAGE, B.DEFAULT_TERRITORY DEFAULT_TERRITORY,B.TEMPLATE_TYPE_CODE TEMPLATE_TYPE_CODE, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STATUS TEMPLATE_STATUS, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.DS_APP_SHORT_NAME DS_APP_SHORT_NAME, B.DATA_SOURCE_CODE DATA_SOURCE_CODE, L.LOB_TYPE LOB_TYPE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE L.APPLICATION_SHORT_NAME= :1 AND L.LOB_CODE = :2 AND L.APPLICATION_SHORT_NAME = B.APPLICATION_SHORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND (L.LOB_TYPE = 'TEMPLATE' OR L.LOB_TYPE = 'MLS_TEMPLATE') AND ( (L.LANGUAGE = :3 AND L.TERRITORY = :4) OR (L.LANGUAGE = :5 AND L.TERRITORY = :6) OR (L.LANGUAGE= B.DEFAULT_LANGUAGE AND L.TERRITORY= B.DEFAULT_TERRITORY ))
    at oracle.apps.xdo.oa.schema.server.TemplateInputStream.initStream(TemplateInputStream.java:403)
    at oracle.apps.xdo.oa.schema.server.TemplateInputStream.<init>(TemplateInputStream.java:236)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.getTemplateFile(TemplateHelper.java:1164)
    Regards
    Dharma

    what you can't understand?
    OPP.log tell you what no lob for template (layout as rtf, pdf) in tables XDO_LOBS and XDO_TEMPLATES_B
    so you have the query for checking
    >
    Please gudie me to solve this error..
    >
    for AR Open Balances get appl_short_name
    find template by query from opp.log or by xml publisher resp
    check existing of template file

  • In which table the initial balances will be stored when loading via api

    Hi all,
    I am doing initial balances migration...
    In which table the initial balances will be stored when loading though an api.. (pay_balance_upload.process).
    First I have loaded data in to pay_balance_batch_headers and pay_balance_batch_lines tables..
    Then called the api pay_balance_upload.process. and the data was reflecting correctly in front end.
    But we need to reconcile the loaded data.. for that, can anyone please tell me in which the loaded balances would be stored..
    I have identified two tables, pay_assignment_latest_balances
    and pay_latest_balances
    when I try to create a balance from frontend I can see the data in pay_latest_balances table..
    But when I load via api I am not able to find it in any of these tables..
    In addition to that can anyone please tell me when the data will be populated in pay_assignment_latest_balances and pay_latest_balances tables.
    Awaiting for your help and quick response..
    Thanks and Regards
    Kishore

    You have followed the correct process..As Vignesh said, you can use pay_balance_pkg.get_value to make sure you have the correct values uploaded but otherwise if you are able to see the values in the front end I wouldn't worry about the latest balances tables. These tables, as the name indicate, hold only the latest values and if a payroll (ran post the initial balance upload) has been rolled back, these are deleted since they are no longer available.
    You can refer the below Metalink notes for a detailed explanation:
    The Secret Life of Initial Balance Upload with Screenshots Example [ID 60057.1]

  • Table name of Customer opening balance & Closing balance

    Hi Gurus.,
                           I want to know the tables in to which the customers opening balance and closing balance is posted,
    VERY VERY URGENT
    Thanks & Regards
    Narayana
    Message was edited by:
            manam narayana

    Hi Manam,
    You cann't find opening/ closing balance in any table.
    T. Code for opening/closing baloance is FBL5N.
    SAP calculate opening/closing balance by using table BSID (Open items) and BSAD (Closed items).
    Regards.
    PS: Assign points if useful.

Maybe you are looking for

  • Ipod mini hard drive goes crunch and now get Sad face with IPOD

    I've notice that after I installed new ITUNES and Updater software, my mini has the following problems: 1. Click to the song and it just sits there and then it might skip over a the next song or songs before playing, like it is frozen 2. I hear the h

  • Delete Oracle9i

    I was running with Oracle9i and than my computer was slowing and slowing and finally shut down.I tried to restart several times but today I decide to uninstall Oracle. It is so big and I think I should be more patience but I don't have time. So I sta

  • Cannot connect to the store

    Anyone have any ideas of why my ipod touch would be saying "Cannot connect to the store A secure connection could not be established. Please check your Date and Time settings." I have checked my date and time settings and they are correct, but it sti

  • Start stop while loop with tab control

    I want to be able to start and stop a while loop by entering and leaving a tab.  I am using an event structure to do so but it doesn't seem elegant or the right way to do this.  The only way I was able to get it to kind of work is by unchecking the l

  • My iphone 4 did not make call. It can receive calls, send and receive sms, internet is working. How can I solve this problem?

    My iphone 4 did not make calls but I receive calls, send and receive sms, emails, etc. How may I solve it?