How to query opening balance for all customer or Vendor for an speci. date

Hi,
How to query opening balance for all customer or Vendor for an specific date?
Example:
put any date and query will show all customer/ Vendor  that date opening/current balance.
Regards,
Mizan

Hi mizan700 ,
Try this
SELECT T0.[DocNum] As 'Doc No.', T0.[CardCode] As 'Customer Code',
T0.[CardName] As 'Customer Name',(T0.[DocTotal]-T0.[PaidSys]) As 'O/S Balance'
FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
INNER JOIN OCRG T2 on T1.GroupCode = T2.GroupCode
INNER JOIN INV1 T3 ON T0.DocEntry = T3.DocEntry
WHERE T0.[DocStatus] ='O'
AND
(T0.[DocDate] >='[%0]' AND T0.[DocDate] <='[%1]')
Regards:
Balaji.S

Similar Messages

  • How to calculate Opening balance for a customer?

    Hi Experts,
    How to calculate Opening balance for a customer? I am trying to develop a report where in i have to get opening AR balance,current sales,adjustments etc of a customer. Please let me know how can i do this. I have some tables with me KNC1, BSAD, BSID.
    Thanks in Advance.
    Sharat Chandra.

    Say for example ..
    Get the opening bal for Customer 'K' in CCode 'C1' in 2008 ..
    First get all items from BSEG ..
    Select * from BSEG where KUNNR eq 'K'
                                     and BUKRS eq 'C1'
                                     and GJAHR eq '2008' .
    Sum all the DMBTR values (This is the total value).
    Second get the cleared items form BSAD for the above entries;
    Select * from BSAD for all entries in BSEG where KUNNR and BUKRS and XBLNR eq BSEG-XBLNR.
    Sum all DMBTR values ( this is cleared value).
    Third substract the cleared value from total to get Open value.
    This is a overview .. you should go to the tables and look for fields and etc.. and then define the logic meeeting your requirements .... this is a genric undersatnding ....
    Thanks,
    Aditya. V

  • How to get opening balance of a g/l account using query ?

    Dear all,
    I'm developing consolidated g/l accounts debit,credit totals month wise with opening & closing balances thru query based report,
    i'have got expected results except opening balance g/l account,
    How to get opening balance of a g/l account based on date as conditonal parameter ?
    Any one throw light on this ?
    Jeyakanthan

    Hi ,
    Please kindly help me on this.I don't know how to calculate opening bal and closing bal over a period of time by Quarter, and how to generate the reprot using crystal reports and please suggest me on this how to go ahead with this report.
    Here you can go through the reprot requirement , and also an attachment of my Report template.
    we have "Category of Investment" , "Income On Investment" ,"Gross yield" and "Net yield" are  report fields.
    1)"Category Of Investment " is Hardcoded.
    2)In this we have to get  "Investment" column from VTBFHAPO(BZBETR Field) table Database based on
    Flow type(SFHAZBA) in VTBFHAPO table ='0100' for bonds category.
    3)"Income on Investment" also we will get from DB using the following formula.
      Income On Investment= "Interest IncomeAmortizationCapitalgain"
    4)With the Date field(Making Date dimension based on date(DCRDAT) field in VTBFAHPO table.
    By Current Quarter,Year to Date,Last year)
    5)Opening bal---Investment
    Purchase--Flowtype=0100
    Meturity/Sales--Flowtype=0200
    Closing balance=Opening bal+(Investment or Purchase)-(Meturity or Sales)
                                      '0100'                 '0200'
    Here '0100' and '0200' are Flow types based on this i need to get value from the same Field.
    we need to Calculate "Gross yield" .
    The bellow are formulas  to evaluate "Gross yield "
    Ist Qtr  .Gross yield=Investment income/(((April opening balanceApril closing balance)/2)((May opening balanceMay Closing Balance)/2)((June opening balance+June closing balance)/2))/3)
    Ist qtr. Year to date   Gross yield=Investment income/(((April opening balanceApril closing balance)/2)((May opening balanceMay Closing Balance)/2)((June opening balance+June closing balance)/2))/3)
    Investment income=interest incomeamortisationcapital gain
    Iind Qtr.Gross yield=Investment income/(((July opening balanceJuly closing balance)/2)((Aug opening balanceAug Closing Balance)/2)((Sept. opening balance+Sept. closing balance)/2))/3)
    Iind Qtr. Year todateGross yield=Investment income/(((April opening balanceApril closing balance)/2)((May opening balanceMay Closing Balance)/2)((June opening balanceJune closing balance)/2))((July opening balanceJuly closing balance)/2)((Aug opening balanceAug Closing Balance)/2)((Sept. opening balance+Sept. closing balance)/2))/6
    This data should display over a period of time. based on "Current Quarter","YearToDate" and "Last year"
    The quarter starts from April,i,e FY,  I Like this i need to generate the report.
    Thanks in advance.

  • How to calcualte opening balance of supplier for given period

    Hi all,
    i have to develoed suppler ledger report.please help me how to calculate opening balance of supplier.
    Thanks and regards,

    Hi,
    Are you looking out for the outstanding balances for the Supplier.
    If in this case, if you are particular to know the opening balance of the supplier then you can run the report
    called ' Supplier Open Balance Letter', wherein you can get the opening balance of the supplier.

  • How to enter opening balance for GL A/C(Ex. Bank A/C, Cash A/C, Vendor A/C)

    Hi Expert,
    How to enter opening balance for last year to closing balance to this year opening balance explain deeply helpful for me Thanks in advance.
    Example
    All Bank A/C, Cash Book, Vendors, Customers, like that how to enter closing to opening balance.
    With Warm regards,
    Selva

    Dear,
    As per SAP standard there is no need to carry forward the balances as the system will do a virtual carry forward into next year opening without creating any FI documents.
    If your business scenario demands then you can use the transaction code F-02 for posting a carry forward balances, this will not effect any of your balances but only creates a FI document.
    If your R3 version is SAP ECC5 or 6 then use the transaction code FAGLGVTR

  • How to find Opening Balance for Cash Book

    Hello Friends,
    I am Creating one Report for Cash Book.(Means : For Perticuler GL Account)
    I have no idea how to find Opening Balance for some Perticuler Date.
    Ex.
         Current date: 07/06/2007
        and i want to find Opening Balance on 26/05/2007
    i have Function for Calculating Opening Balance,                                                                               
    Group No: 3006             Business Object General Ledger Account  
    BAPI_GL_ACC_EXISTENCECHECK     Check existence of G/L account                  
    BAPI_GL_ACC_GETBALANCE     Closing balance of G/L account for chosen year  
    BAPI_GL_ACC_GETCURRENTBALANCE  Closing balance of G/L acc for curr year
    BAPI_GL_ACC_GETPERIODBALANCES  Posting period balances for each G/L account    
    but they show current opening balance, and i want for perticulaer Date..
             How to find Opening Balance for Cash Book
    please Help me out
    Thanks
    Gaurav Tripathi

    Hi Maruthi,
       Opening balance for a cutomer for a given period, u need to first find closing balance of that customer in the previous period. For eg. Suppose u want to find opening balance for customer 'A' for month of Nov'06, then U have to find wot was his closing balance in at end of Oct'06. Hope this solves u r problem

  • How to get Open Balance for the year and Total Ending Balance?

    For a given account, how to get Open Balance for the year (Cumulative Ending Balance) and Total Ending Balance (Cumulative Ending Balance)?
    Is there any function module available? or should I read from some tables? Please advice.

    Hello Paul,
    You could try calling one of the following BAPIs - see which one meets your requirement. They are documented well so shouldn't be a problem finding out the correct one for your requirements.
    BAPI_GL_GETGLACCBALANCE      
    BAPI_GL_GETGLACCCURRENTBALANCE
    BAPI_GL_ACC_GETBALANCE      
    BAPI_GL_ACC_GETCURRENTBALANCE
    BAPI_GL_ACC_GETPERIODBALANCES
    BAPI_COND_VAL_DECRE_BALANCES
    You might have to put in some of your own logic after the BAPI call to get what you want.
    Hope this helps,
    Cheers,
    Sougata.
    p.s. Also look at FM FAGL_GET_ACCOUNT_BALANCE
    Edited by: Sougata Chatterjee on May 7, 2008 11:47 AM

  • How to Calculate Opening balance

    Hi BW Gurus,
    How to calculate Opening balance for previous period using variables in Reports using debit and credit.
    Example:
    Opening balance is the balance for an account for the previous period. In other words, if the user is running a report for Period 1, 2006, the opening balance is actually the ending balance from Period 12, 2005 (December 31st, 2005).
    Thanks in advance
    DJ

    Hi Friend,
    If Your Prob is solve then tell me how to find perticular month balance amount.
    i m create cash book report for perticuler GL Account , i use BKPF + BSEG for this
    i found all entries,
    But at last i want to Opening Balance for perticuler date.
    like     01/05/2007 opening balance = 10000 as per tcode FS10N
    and in 26/05/2007 ??????
    how to find exact date opening balance is there any function for same
    or any procedure..
    Thanks
    From
    Gaurav

  • HOW TO CALCULATE OPENNING BALANCE

    HI Experts..
    How to calculate Opening balance for previous period using variables in Reports using debit and credit.
    Example:
    Opening balance is the balance for an account for the previous period. In other words, if the user is running a report for Period 1, 2006, the opening balance is actually the ending balance from Period 12, 2005 (December 31st, 2005).
    I am Using 0FIAR_O03 ODS ..
    Very Urgent Issue..
    If Possible Stp by Step..
    Cheers
    Purushottam
    09891683828
    [email protected]

    Hi Saloni,
    to get the debit and credit you would be using a variable 0I_FPER(Fiscal year / period), which is a user entry interval variable.
    now to get the opening balance you will have to create a customer exit valiable and the low value of 0I_FPER will have to popuplated by writied the code for the customer exit valiable. you will have to restrict the key figure DEB_CRE_LC for this customer exit variable with the operand as less than(< Fiscal Year /Period from 0I_FPER)).
    If the above was useful please assign reward points.
    Regards
    Venkata Devaraj

  • How to display Opening Balance/Closing Balance in Genral Ledger PLD

    Hi all,
    How to display Opening Balance
    in General Ledger
    PLD
    (OB is already displayed in
    header of print report)
    on first page only?
    How to display Closing  Balance
    in General Ledger
    PLD
    (CB is already displayed in
    footer of print report)
    on Last page only?
    Thanks,
    With regards,
    Jeyakanthan.

    Hi,
    If you open General Ledger Report and after selecting customer code you will see the Print Preview. On that time, one window opens and asks you to select any one from two options.
    Option 1 : Book of Accounts
    Option 2 : Subsidiary Account
    In both the Options, PLD has Opening Balance in Repetitive Area Header and Closing Balance in Repetitive Area Footer. So, it will when Report grows more than one page and if you want to see both the Opening Balance and Closing Balance in all the pages then you should Tick the Check Box "Display Repetitive Area Footer on all Pages" . So that you can view OB and CB in all the pages.
    Raja.S

  • How I put Opening Balance

    Hi All,
    I am New in SAP B1 Can everyone tell me how i put inventory or business partner opening balances.

    Hi Naveen,
    For Inventory Opening Balances use
    Inventory -> Inv.Transactions -> Initial Quantities, Inventory Tracking, and Inventory Posting -> Initial Quantities
    For GL Opening Balances
    Admin -> Sys.Init -> Openining Balances -> GL account.Open.Balances
    If you want the BP Opening Balances as single entry then use this
    Admin -> Sys.Init -> Openining Balances ->  BP.Open.Balances
    If you want the breakup for the Opening balances for each BP, then use
    DTW to import using OINV, OPCH templates as Service type document
    Regards,
    Bala

  • How to legecy opening balance

    Dear Friends
    Please  let me know how to legecy opening balances import respective GL  accounts in SAP. Customer, Vendors, we can import LMSW or BDC
    Regards
    NitheshP

    Hi,
    You can upload the Master Data or opening balances of Customers, Vendors, Materials and Asset through LSMW tool or you can also upload through BDC with the help of ABAPers.
    Srinivasa Chary

  • How to prepopulate value in webapps input fields or for any custom fields in for any other forms?

    How to prepopulate value in webapps input fields or for any custom fields in for any other forms?

    What do you want to populate the form with?

  • How can I open a file in a seperate window. for example how can"D:\asd.doc"

    how can I open a file in a separate window. for example how can I view "D:\asd.doc" in ms words window ??

    Check out the Desktop class.
    Edited by: pbrockway2 on Aug 23, 2008 2:20 PM
    There's a detailed example in Sun's Tutorial.

  • Finding all Customer Master fields for BAPI creation !

    Hi All,
    Could anyone help me out which BAPI  FM is available for all Customer Master Fields as well as payment(FI) related
    for example=> Customer name,Street Address,PO Box Address,Postal Code, City,Country,Account No, Incoterms,Order Pending,
    Credit Analyst Name, Credit Rep Grp No,Accounting Clerk No,Approved,Credit Rating,Risk Code etc.
    Appreciate your immidate reply.
    Thanks,
    Prasad.

    Hi,
    If you are trying to create customer , then i dont think BAPI s will help you.. As far as i know for customer creation there is no BAPI. You have to go for BDC. Call transaction or session method.
    Ansari

Maybe you are looking for

  • Ipod connection to pc

    I have an older version of the Ipod Scroll. It does not have a dock port only a firewire port. There must be some way that I can connect it to my PC, just no one I have spoke to can help me. Is there an adapter from firewirt to usb, and if so where c

  • Performance tuning  - Is database using Star Transformation?

    Reports running slow, not sure if database is using Start transformation for the Datawarehouse  Database. Used hint  */+ STAR_TRANSFORMATION */, still no performance increase. Checked database parameter - SQL> show parameter star; NAME               

  • Trying to install ,NET3.5

    I've been reading other threads to try to fix the installation problem with SQl Server that I'm having. What I found is that I've been confused. I thought that .NET 4.5.1 replaced .NET3.51. I've now seen that it is a separate issue. So, I downloaded

  • Please heeeelp!!

    Ok. so below is the code and in red shows syntax error ??? please help anyone as im new to all of it.. <?php // Set email variables $email_to = '[email protected]'; $email_subject = 'Form submission'; // Set required fields $required_fields = arr

  • Adf mobile : calling rest post method

    Hi all, I am calling a rest post using rest adaptor but i am getting the following error: Unable to find operation : unknown Please tell me where should i specify the operation name while calling rest post method. Regards, Deepak