Why should we calculate cumulative balance as per posting period?

Hi,
I dont know whether we can pose this type of questions here or not.
Why should we calculate cumulative balance as per the posting period?
How is it going to work?
Hope I will get an answer. Thank you

Hi, you've got a couple of issues with the formula the biggest being that EARLIER() needs to be used in an iterator so should be contained in a FILTER() here. Suspect you also don't need the ALL().
That said, I think you might be over complicating the problem. Based on you output at the bottom, all you really need to do this is a flag on each order to say whether or not that order date matches the latest order date in that year for that customer. Assuming
you add a column for year you could use something like:
=
IF (
[Date]
= CALCULATE (
MAX ( [Date] ),
FILTER (
'Q3 Data Set',
[Customer ID] = EARLIER ( [Customer ID] )
&& [Year] = EARLIER ( [Year] )
"Y",
"N"
Jacob | Please mark helpful posts and answers

Similar Messages

  • GL Trial Balance as per Posting date

    Hi All,
    It would be helpful if someone help me how to get GL Trial Balance as per Posting date. in T-Code S-PL0-86000030 we get the report according to the periods. But there is a development requirement according to Posting date from where and how we can fetch data.
    Please help me.
    Thanking you,
    Rajeshwari

    Hi,
    The trial balance (TB) is a report listing the ending debit and credit balances in all accounts at the end of a reporting period.
    Therefore, to have posting date in TB against total balance is not the right requirement, however If, you need posting date against each balance (entry), you use GL Line item reports e.g. :
    S_ALR_87012282 - G/L Line Items, List for Printing
    FAGLL03 - Display/Change Items (New)
    Regards
    Javed

  • Calculate cumulative balance in the PCA query

    Hello All
    1. I have a requirement where I have to calculate the 'Cumulative Balance' at a G/L Account, Fiscal Year/Period Level for PCA data.
    2. I am not able to find any source field in R/3 so that I can simply enhance the 0EC_PCA_3 extractor and get it into the PCA cube.
    3. The basic logic is:
                    I have 0CREDIT and 0DEBIT KFs in my cube.
                   The difference of  0CREDIT & 0DEBIT = Balance (ie. credit + debit)
                 But, Cumulative Balance (say for period 1/2010) = Balance for 1/2009 + Cumulative balance for 12/2008 (year end)
    Another ex, Cumulative Balance (say for period 2/2010) = Balance for 2/2009 + Cumulative balance for 1/2009       
    (NOTE: If we go back to the first period when SAP went live in this company, ex: 01/2002 then will see that the:
                       Cumulative balance for 01/2002 = Balance for 01/2002 + 0 (since there is no prior ***. balance)
    4. I can clearly see that I cant do this in the cube by using ABAP, since its granularity goes to Accounting Doc, Material level (ie item level).
    5. So I have to do this on the fly in the BEx Query, by writing a customer exit. I dont think simple offsetting variables would work either.
    Can anyone give me a possible solution to the above problem?
    Regards.

    hi is your problem solved , if so please describe here.
    now i am having the same problem

  • Displaying Cumulative Balances in BA Balance Sheet Report Painter Reports

    Dear SAP Gurus,
    The system has Business Area Balance Sheet reports created in Report Painter. But in General Data Selection when I select period as a full fiscal year then the cumulative balances are shown. But if I wish to see the reports for a period or a quarter the opening balances for that period are not shown. And only the figures pertaining to that period are shown. Can someone tell me why this is happening like this? I wish to see the cumulative balances even for these periods. Please help me.

    Hi
    You can achieve through SELECTIONS. do like this suppose you have the line item called Inventory(this inventory will capture the data from two or three GL accounts say ex: 123,456,789).you can create the selection with the name inventory and use these GLaccounts in that.when you see the report it will show
    Invantory            $1000
    Share Capital     $2000
    Deposits            $3000
    when drill down it will shoe GL account wise also.
    Regards,
    chandra.

  • Error cumulative balance FAGBLB03

    The  cumulative balance in the last period of 2009 is 2.942.340,23.
    In the first period of 2010 there are no credit or debit but the cumulative balance is 1.469.076,03.
    When double click on the cumulative balance of 2010 in the account line item display G/L the amount is 2.942.340,23.
    This difference between the cumulative an the total amount when I double click to see the line item display is in all the periods of 2010 and allways for the same amount of 2.942.340,23 - 1.469.076,03 = 1473264,2
    any ideas?
    thanks in advance

    Hi,
    Please check the below OSS notes:-
    [https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1223997]
    [https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1047254]
    [https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1005736]
    [https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1029639]
    Regards,
    Gaurav

  • How to calculate First Date of Posting Period in BEx Query

    Hi,
             I have  2 reporting requirements as follows:
    1) User will either enter a single posting period in a fiscal year or can enter a range of posting periods.
    Based on user selection I need to display three key figures in a report.
    Key figure 1 and Key Figure2 should be the summarized values for each posting period.
    key Figure 3 should be the value on the first date of that particular posting period (in case user selects multiple posting periods i should derive the value of the first date of each posting period).
    2) Also, in another report I need to display only top 8 values  for one key figure in the report.
    Please let me know the method or code required to get this Functionality.
    Thanks in advance.

    First Report
    1. Create Restricted KeyFigure 1 & 2 for the summarized values.
    2. Create a Customer Exit Variable for getting the first date of the posting period, this should be of type Interval. Write code using FM FIRST_DAY_IN_PERIOD_GET to get. Read the selection variable to see the range of posting period and you have to insert that many first dates into this variable.
    3. Create a new Restricted KeyFigure 3 and use the Customer Exit variable created in Step 2
    Second Report
    Use the Top N functionality of BEx and create a workbook. You can set the option Refresh query when the workbook is open so that the data is current when opened.
    Hope this helps.

  • Difference between cumulative balance and line items total in FS10N

    hi,
    when I am executing FS10n, I observed that the cumulative balance amount is not equal to line items total .  This is due to some amounts in previous years are varying from the line ltem totals in those periods of previous years.
    This is not happening with QA server only Prdn server is facing this problem.  Can anybody provide me a way to solve this..!?
    Regards,
    AJo
    I have checked the master data for the GL and the check box for line item display is selected. It has not been changed for years.
    Edited by: Anil Jonnalagadda on Oct 22, 2008 10:57 AM

    Hi Anil,
    The reason for the differences that you are viewing can be various. As the differences are found in the cummulative balance then it means that the differences might have occurred in previous fiscal years. The first stetp is to find when these differences were originated: You can run report SAPF190 (in se38) for previous fiscal years, and company code in question- This report should show the differences with message "Errors" in the log. If differences are found then you have to creeate a message and send it to SAP for further analysis and corrections.(only SAP experts can do this kind of corrections - component FI-GL-GL-X)
    Also bear in mind that if you did archiving in previous fiscal years then this would not be an error:
    If you already did archiving and secondary index deletion on this accounts with SAPF048I. So this explains why line items balance and GL summary balance differ ! There is no programm error.
    See consulting note 81489 which describes this issue:
    The balance of an account results from the balance of the open items. In
    connection with an archiving that has been carried out, the line item
    display - used with cleared items - must not therefore be interpreted as
    a balance display. For the balance display, there are separate
    correspond to the display balance of the open items from the line item
    display.
    Having archived and deleted secondary indexes ( with SAPF048I )
    for an account you can not use line item drill down as a balance
    display any more for a line item managed account.
    ( as not all line items are existing any more in table BSIS ! )
    The transactions meant to display the binding balances are  FS10N,
    FK10N and FD10N.
    They also give you the line items details, but only of those line
    items not yet deleted ( by SAPF048I ).
    kind regards,
    Oscar Diaz

  • YTD Cumulative Balance Calculation

    Hi All,
    I need to calculate YTD Cumulative Balance.
    User will provide fiscal year/period in run time.
    Cumulative balance should be calculated from fiscal year/period 0000 to user provided fiscal year / period.
    ex. if user entered value is march, 2010 then cumulative balance should be calculated as
    00 2010 + 01 2010 + 02 2010 + 03 2010.
    Please help me in acheiving this.
    Thanks,
    Sri Arun Prian

    Hi Sri,
    I hope this may be this is better version of code for your problem, esp. with Cust. Exits for months in YTD
    WHEN 'VAR_TEST_SOMETHING'.
        IF I_STEP = '2'.
          DATA : V_INPUT_PER TYPE /BI0/OIFISCPER.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'WHATEVER_TABLE'.
          IF SY-SUBRC = 0.
            V_INPUT_PER = LOC_VAR_RANGE-LOW.
            IF V_INPUT_PER+4(3) = '001' OR  V_INPUT_PER+4(3) = '002' OR   V_INPUT_PER+4(3) = '003'.
              CONCATENATE V_INPUT_PER(4) '001' INTO L_S_RANGE-LOW.
              L_S_RANGE-OPT = 'EQ'.
              L_S_RANGE-SIGN = 'I'.
              APPEND L_S_RANGE TO E_T_RANGE.
              CONCATENATE V_INPUT_PER(4) '002' INTO L_S_RANGE-LOW.
              L_S_RANGE-OPT = 'EQ'.
              L_S_RANGE-SIGN = 'I'.
              APPEND L_S_RANGE TO E_T_RANGE.
              CONCATENATE V_INPUT_PER(4) '003' INTO L_S_RANGE-LOW.
              L_S_RANGE-OPT = 'EQ'.
              L_S_RANGE-SIGN = 'I'.
              APPEND L_S_RANGE TO E_T_RANGE.
            ELSEIF V_INPUT_PER+4(3) = '004' OR
                   V_INPUT_PER+4(3) = '005' OR
                   V_INPUT_PER+4(3) = '006'.
             Similiarly for rest of the months....
            ENDIF.
          ENDIF.
        ENDIF.
    Just for reference.
    Thanks
    Arun Bala
    Edited by: Arun Bala G on Feb 26, 2010 6:46 AM

  • Calculate closing balance

    Hi everyone,
    I've got a problem with writting a formula wich will calculate a closing balance for each account side, I mean debet and credit. In my SQL database I've got columns with: OpeningBalanceDt, OpeningBalanceCt , DtTurnover, CtTurnover, IDaccount and TIMEID.
    When I create a Calculated Field:
    BalanceDt:=IF(([OBDt+Dt]-[ObCt+Ct])>0;[OBDt+Dt]-[ObCt+Ct];0)
    BalanceCt:=IF(([ObCt+Ct]-[OBDt+Dt])>0;[ObCt+Ct]-[OBDt+Dt];0)
    it works for particular account eg:11575, but it doesn't when I remove filter and check global account nr 111 (then I have per account result).
    Do you have any idea what formula I need to write to have a proper view it pivot table for both account side ? Meaby I need to create a calculate column not filed...
    The problem concerns the fact that pp check columns globally and then compare calculeted sum. In this case global sum of BalanceDt has a higher value than BalanceCt so the final balance is Dt.
    In excel I can calculate 2 columns:
    =if((OBDt+Dt-(ObCt+Ct))<=0;0;OBDt+Dt-(ObCt+Ct))
    =if((OBCt+Ct-(ObDt+Dt))<=0;0;OBCt+Ct-(ObDt+CDt))
    and when I create a sum I've got a proper result. Maybe the solution will be in grouping the accounts and then conduct a comparision.
    Thanks in advice,
    Paul

    Hi,
    I will change a subject a little bit. Now I have the following columns:
    ObrotyKontID, WN, MA, BO_WN, BO_MA, KontoFinansoweID, KontoSyntetyczneID and TIMEID. Guy from ERP wrote two formulas which works perfect in system and calculate closing balance for each account side:
    Debit
    Sum(Filter(existing[KontoAnalityczne],[Measures].[ObrotyWNNar]>[Measures].[ObrotyMANar]),[Measures].[ObrotyWNNar]-[Measures].[ObrotyMANar])
    Credit
    Sum(Filter(existing[KontoAnalityczne],[Measures].[ObrotyWNNar]<[Measures].[ObrotyMANar]),[Measures].[ObrotyMANar]-[Measures].[ObrotyWNNar])
    and 2 more formulas to calculate Debit and Credit
    ObrotyWNNar
    Sum(StrToMember("[Czas].[Miesiąc].&["+left(Tail(existing [SET_Data]).Item(0).Properties("KEY"),4)+"01]"
    ):StrToMember("[Czas].[Miesiąc].&["+left(Tail(existing [SET_Data]).Item(0).Properties("KEY"),6)+"]"
    ),[Measures].[ObrotyWN]+[Measures].[BO WN])
    ObrotyMANar
    Sum(StrToMember("[Czas].[Miesiąc].&["+left(Tail(existing [SET_Data]).Item(0).Properties("KEY"),4)+"01]"
    ):StrToMember("[Czas].[Miesiąc].&["+left(Tail(existing [SET_Data]).Item(0).Properties("KEY"),6)+"]"
    ),[Measures].[ObrotyMA]+[Measures].[BO MA])
    I have got the same sum in ObrotyWNNar by forumla
    =[WN]+[BO_WN]
    and ObrotyMANar by
    =[MA]+[BO_MA]
    However I can't create proper formulas in powerpiwot which calculate Debit and Credit.  I suppose that I need to use some agregate formulas like SUMX.
    If anyone have any idea ?
    Thanks in advice,
    Paul

  • Difference in Open Balance As per Trial Balance and General Ledger in SAP

    Dear All,
    1 ) Whle generating trial balance in SAP B1 for one Business master there is a difference in Opening Balance as per Trial Balance and as per General Ledger how ever closing balance in matching.
    Difference As follows
    Report Name      ob cr     ob dr           dr                   cr                                  CL
    General Balance          614536     19237612.34            18650320.01     1201828.33
    Trial balanceB     4521743.19          19237612.34       13514040.82     1201828.33
    Is it possible  the open balnce should be same in both report. The opening balance as per GL report is correct.
    2)  I have run the period end closing for Apr- 2010 to Mar 2011 after that I generated the traial balance for Apr-1-2011 where the opening balances for expense account  and revenue account is showing technically after period end closing the balance become zero for all closing balance revenue and expenses accounts.
    Please note that there are some entries in revenue and expense account in on 1st apr. 2011.
    Please guide on this.
    Regards
    Aarati Kollur.
    <a href="http://www.youtubemp3.net/">youtube mp3</a>, <a href="http://www.limewire.name/">limewire</a>

    Hi,
    I think you should re-visit the selection creteria for the Trial balance.
    The Display Opening Balance has two options. If you select from 'Start of Company activity', then it will include every balance of previous year.
    Check for the Display Closing balance option as well. As you have performed the Period End closing, the checkbox options can have an impact on the outcome in the report.
    Check the selection again.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • 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 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 calculate Opening Balance / How to Enhance 0FI_AR_6 DS

    Hi FI Experts,
    I need Opening Balance in my BI report,
    I am using 0FI_AR_6 DS , I have loaded data to CUBE, loaded Successfully.
    In this Data Source I need G/L Account Number and Terms of Payment (Payment Terms)
    I wrote the User Exit for this , then I check in RSA3, data is populating for those two fields.
    When I Try to load the data in to BI, it is not loading , it is showing Request is still Running  , records it is showing zero ‘0’.
    If I remove the user exit , data is loading fine.
    My requirement is to calculate Opening Balance,
    First I used 0FI_AR_4 DS , but I am not getting Accumulated Balance here, then I use the DS 0FI_AR_6 it have Accumulated Balance field but in this DS I don’t have G/L Account Number and Terms of Payment (Payment Terms)
    Its very urgent , we are in UAT stage…
    Need some inputs to resolve this..
    Thanks & Regards,
    SHAIK
    Edited by: shaik on Jan 16, 2008 10:55 AM

    Hey Shaik,
    Why you are using AR extractors to get the G/L account opening balance ? As i understand the AR accounts post to a limited G/L account (known as the recon accounts) and it will not extract all the G/L accounts in the first place. So even if you manage to get the opening balance, AR extractors will not give you all the G/L accounts opening balance. If you need to get the opening balance for the G/L accounts then you need to look at G/L extractors.
    For the AR extractors what is your extraction period range ? Have you included period '000' for your extraction ?
    Hope it helps.
    Thanks,
    Soumya

  • Problem with business partner cumulative balance

    Hi
    I used to used the business partner balance enqury to quickly tell customers what they were due to pay up to the start of the month. I just looked at the cumulative balance of the last transaction of the previous month and that was it. I know I could run an aged credit report but this was quicker and easier. However since upgrade to 2007A the cumulative balance does not give the amount due for a part paid invoice so this does not work any more.
    Question is has anyone writen a fast query or other report that calculates the cumulative balance based on outstanding amount?
    Thanks in advance
    Derek

    Hi!
    Run this in SAP B1 Query Manager
    SELECT     T0.CARDCODE, MIN(T0.CARDNAME) 'Customer Name', SUM(T0.DOCTOTAL - T0.PAIDTODATE) 'Last Balance'
    FROM        DBO.OINV T0
    WHERE     DOCSTATUS = 'O' AND T0.DOCTOTAL - T0.PAIDTODATE > 1 AND T0.CANCELED = 'N' AND DATEPART(month,T0.DOCDUEDATE) < DATEPART(month,getdate()) AND T0.CARDCODE = '[%1]'
    Group By T0.CARDCODE
    UNION ALL
    SELECT     T0.CARDCODE, MIN(T0.CARDNAME) 'Customer Name', -SUM(T0.DOCTOTAL - T0.PAIDTODATE) 'Last Balance'
    FROM        DBO.ORIN T0
    WHERE     DOCSTATUS = 'O' AND T0.DOCTOTAL - T0.PAIDTODATE > 1 AND T0.CANCELED = 'N' AND DATEPART(month,T0.DOCDUEDATE) < DATEPART(month,getdate())  AND T0.CARDCODE = '[%1]'
    Group By T0.CARDCODE
    ORDER BY T0.CARDCODE

  • System doesnt calculate avg as per the period

    i have one query, this is the most crucial issue going on at my firm
    Please advice
    Suppose there is an item.its purchased all round the year from jan to dec
    ORG in which its being purchased and transacted, issued, received is using avg costing method
    so all round the year it would have moving average, which would be varying ..
    now in dec , i decide to transact that item in a back date, say for example march..
    in this case, the system should take the avg cost that was in march or should it take the avg cost which is currently in the system.
    and if it should take the avg that was in march, than all preceding months avg should be updated.
    If it takes decembers current avg, than also all avg from march till dec should be updated by the system
    Please advice wats the correct logic and system action
    thanks
    Muhammed

    use fm hr_hk_diff_bt_2_Dates
    pass gbdat from pa0002 and sy-datum to calculate the age as per system date
    br,
    vijay

Maybe you are looking for

  • Multiple production systems in a track??

    Hello,     Can anybody please let me know, if this is possible? We have a production system (SCP) and a training system (SCN). I want to create a production track in the NWDI with just production systems. Can we have SCP and SCN in this track? I am a

  • Image Gallery in a tabbed panel

    This seems to be an intermittent issue for me (comes & goes). But, when placing an image gallery in a tabbed panel if I select multiple photos to add (at once) it will expand the tab out to 70 thousand or so pixels wide but, if I add photos 1 at a ti

  • Select the Key Figures to be presented in a query before execute the it

    Hi, I want to select(through checkbox) the Key Figures to be presented in a query before executing the query. I'm creating BEX queries and web templates (I'm working on BEX 7.0). I haven't found clear post about this so if you have implemented someth

  • Small logic in ABAP

    Hi,      am very new to abap , i have the logic of Prime number in c language , i want to do it in ABAP , so kindly help me . thanks, Sudhakar

  • Broken Links In Illustrator

    We have purchased new iMac's to replace our current 5 year old Mac pros. So we decided that instead of reinstalling CS5.5, which was what was installed on the Mac Pros , we would got straight to Creative Cloud Now, If an ai file that was previously c