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

Similar Messages

  • 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

  • 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

  • Difference in Cumulative balance of ERP and BW

    Hi Experts,
    We have a report to display the Cumulative balance amount based on G/L account.
    The issue we are facing here is, when we check a May month's cumulative balance in ERP side ( using Transaction code FAGLB03 by giving G/L account number, Company code and Year as 2010) we are getting 1000 EUR, and the May month's Balance is 300 EUR.
    When we run our Query report in BW side for the same conditions( same G/L account, Key due date as 31.05.2010 and same Company code) we are getting the Cumulative Balance as only 900 EUR. we are missing some 100 EUR in our report for our Cumulative balance. But,When I check the Cube on which our Query report runs, I could get the May month's balance as 300 EUR.
    Kindly help me to rectify this issue.
    Thanks.
    Regards,
    Jayaprakash J

    The cumulative balance for the GL should be stored in the key figure 0BALANCE in BW
    What is the amount when you do a list cube on this KF ?
    If you don't have the same as in FI-GL, there are several possibilities :
    1) there's a mistake in the extraction flow (transformation)
    2) you didn't update the BW infocube with the latest data

  • Wrong Cumulative Balance in SBO 2007

    Dear Experts,
    I open up BP Account Balance, and notice the Cumulative Balance was accumulated with the C/D column (which is the document total for that transaction), instead of accumulating it from the Balance Due column which shows unreconciled balance due.
    I have found SAP Note describing this problem as a definition. But logically, I will think that the term BP Account Balance is suppose to mean the balance due for that BP, instead of total  of every transactions related to this BP (Which the system defines it currently). Can anyone explain to me the idea between this system definition.
    And if nothing can be changed in SAP now, is there a work around to find out the "REAL" cumulative balance due for a BP, that is how much "unreconciled" due balance do they have?
    Please help and advice. Much Thanks!
    Warmest Regards,
    Chinho

    Hi,
    As you are aware that the version 2007 had the option of partial reconciliation which was earlier not available in the 2005 version. Therefore, in 2005 Version, the cumulative balance was displayed as balance due field accumulation.
    However, in version 2007A, due to partial reconciliations being available, the balance due does not display the correct balance, hence the cumulative balance displays the total of the C\D fields.
    The same is the logic and the working which is explained in note no. : 1128828 as well.
    Hope it clarifies.
    Kind Regards,
    Jitin
    SAP Business One Product Support

  • Report with cumulative balance

    Hi!
    There is a FI report for vendor ledger based on multiple profit center where a column is there for cumulative balance in the output.
    Now when the user makes a subtotal on profit center the output generates based on multiple profit center but in that case the cumulative balance is misarranged and the output appears to be wrong.
    what should I do to generate correct cumulative balance based on profit center.
    thanx
    Amit

    Dear Feroz Dosani.,
    Since your account has been set up as FC, only FC balance can be directly controlled.  The difference between LC Cumulative Balance and the rate conversion come out of the fact: Exchange Rates are changed everyday,  all conversions would be done in posting day rate.  You have to run Exchange rate difference from time to time to reconcile LC.
    Thanks,
    Gordon

  • BP - CUMULATIVE BALANCE

    In my opinion the Cumulative Balance should display the sum of the "Balance Due" from each transaction.
    In Version 2007 A ..."the Cumulative Balance field sums up the total transaction (invoice/payment) amounts. This field takes the amounts from the 'C/D (LC)' field and not the Balance Due field. Therefore, the total of the 'Balance Due' is not the same as the 'Cumulative Balance (LC)' "...
    I think this is not the correct option, at all.
    The Cumulative Balance field, only shows the cumulative balance of the transactions displayed on the screen. The Cumulative Balance differs when the option " Display Unreconciled Transactions Only " is ticked or unticked.(if there is partial payments or reconciliation...)...

    Hi Natalina,
    cumulative balance is only informative value. It displays the information based on the original value of the transaction.
    Example:
    If there are transactions with following numbers:
                        LC     Balance due     Cumulative balance
    IN                100            100                100
    Payment    (100)            (100)             (100)
    Result            0                0                 0
    If there are transactions with partially reconciled numbers then the values should also be balanced: for example:
                        LC     Balance due     Cumulative balance
    IN                100            50                100
    Payment    (100)            (50)             (100)
    Result            0                0                 0
    The case when there would be balance due different on these transaction there must be another transaction as otherwise the balance due would not balance on BP account.
                        LC     Balance due     Cumulative balance
    IN                100            0                100
    Payment    (100)            (50)             (100)
    Payment    (100)            (50)             (100)
    Result        (100)            (100)           (100)
    There might be cases when there are differences e.g. in case of not recognized exchange rate (for foreign currency transactions) difference.
    Best Regards,
    Martin Slavik
    SAP Business One Solution Manager

  • FAGLB03 cumulative balance fieldname??

    Experts!!
    I need your help please..
    I need to know which table they store the figures of cumulative balance field.
    Im using transaction FAGLB03.
    then there is cumulative balance field which im going to used in my program for computation.
    Problem I cant find the table and its fields..
    I tried to used ST05 .but I failed to find it.Please help me...

    Hi,
    In my opinion the Cumulative Balance should display the sum of the "Balance Due" from each transaction.
    In Version 2007 A ..."the Cumulative Balance field sums up the total transaction (invoice/payment) amounts. This field takes the amounts from the 'C/D (LC)' field and not the Balance Due field. Therefore, the total of the 'Balance Due' is not the same as the 'Cumulative Balance (LC)' "...
    The Cumulative Balance field, only shows the cumulative balance of the transactions displayed on the screen. The Cumulative Balance differs when the option " Display Unreconciled Transactions Only " is ticked or unticked.(if there is partial payments or reconciliation...)...
    regards,
    Sanju M S

  • Cumulative balance tranfer problem

    Hi this is ram,
    I have problem with carry forwarding the balance from one year to another year regarding cumulative balance. it is taking only balance only for next year.
    Thanksin advance,
    ramanjaneyulu

    Hello,
    And another observation is if the balance carryforward has been done then all GLs would have the balance in that field, its not so. In addition I found that the balances displayed in the cumulative balance for the transactions which are entered in the current year with the posting date of previous year. Example, documents are entred in Jan 2011, with the posting date of Dec 2010. I dont understand is any correction needed and any notes relating to this.
    Regards
    Sunil

  • 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

  • Opening and Cumulated Balances of PCA

    Dear BI Gurus,
           I am using two standard (PCA) Data Sources
    <b>1. 0EC_PCA_3 and
    2. 0EC_PCA_4</b>      to Load data into my Custom Cube.I need Cumulated balance and Opening Balance of Actual Line Items for my reporting purpose.
    There is an object 0BALANCE which is not getting populated from the  0EC_PCA_3 Data Source.
    We are able to get only the Cumulated Balances of Periodic Transfer, but unable to get the Balances of all the other Accounts.
    So, can anyone please help me out in getting the Cumulated Balances and Opening Balances of the Account Numbers.
    With regards

    For Delta update
    The extract structure does not contain the BALANCE field. To get the inventory for balance sheet account, 0BALANCE can be filled in BW in den updating rules. For further information, see note 577644.
    Or you can do full load
    http://help.sap.com/saphelp_nw04/helpdata/en/5d/ac7d8082a27b438b026495593821b1/content.htm
    Hope it Helps
    Chetan
    @CP..

  • Difference in Cumulative balance amount of ERP and BW query report

    Hi all,
    We have a report to display the Cumulative balance amount based on G/L account.
    The issue we are facing here is, when we check a May month's cumulative balance in ERP side ( using Transaction code FAGLB03 by giving G/L account number, Company code and Year as 2010) we are getting 1000 EUR, and the May month's Balance is 300 EUR.
    When we run our Qury report in BW side for the same conditions( same G/L account, Key due date as 31.05.2010 and same Company code) we are getting the Cumulative Balance as only 900 EUR. we are missing some 100 EUR in our report for our Cumulative balance. But,When I check the Cube on which our Query report runs, I could get the May month's balance as 300 EUR.
    Kindly help me to rectify this issue.
    Thanks.
    Regards,
    Jayaprakash J

    Hi,
    Check is there any restrictions are there . the data must be displayes if the data is there in infocube.
    Regards
    sivaraju

  • Cumulative balance (FC) show ****, can perform query?

    Dear Experts,
    Hi,
    In the Chart of Accounts -> Account Balance, the cumulative balance (FC) column shows **** when there
    are multiple foreign currency transactions being posted to the GL account.
    I understand that this is a standard system behaviour but is there a way or any workaround to find out how much balance for each foreign currency in the account?
    Is it possible do in query to add up all foreign currecy amount?
    Thanks.
    Regards,
    Danny

    Dear Danny,
    This is not only a standard system behavior but also the only way to display.  Simply because, the number stand for different values that could not be added together.
    You may create a query based on each individual FC to get separate meaningful totals.
    Thanks,
    Gordon

  • Cumulative Balances in PCA Balance Sheet cube are not correct.

    Hi
    Could you please help me in sorting out this Issue.
    Cumulative Balances in PCA Balance Sheet cube are not correct.
    After doing a reconciliation my conclusions are:
    Opening balance for 2005 (fiscal period 009.2005) is not in BW
    Opening balance for 2006 (fiscal period 000.2006) is not in BW
    Opening balance for 2008 (fiscal period 000.2008) is not in BW
    Opening balance for 2009 (fiscal period 000.2009) is not in BW.
    With the exception of fiscal year 2007(opening balance is in BW u2013 000.2007) the cumulative balance resets itself at the start of each fiscal year. The attached spreadsheet has an example of the data in BW and screen dumps from R3.
    Please help me how to find Opening balance in BW for PCA
    Thanks
    Bharti

    you need to derive your begining balance based on the fiscal year in your selection. It will be minus 1 year and period 12 for that year.
    pts appreciated.

  • Variable for ReportSum of Cumulative Balance Due in the General Ledger

    Hello ,
    my Customer need in the General Ledger Report only the sum of Balnce Due, Cumulative Balance Due .
    Ok, for all i find a varible for Sum of the report. But not for the Cumulative Balance Due.
    In the Repetitive Area 0 is the variable 186 setting, thats ok.
    But in the Page Footer when i set formula  > ReportSum ("Field_with_Variable_186") the sum is the sum about all
    the row and not the Summe of all the Repetitve Area´s
    Can you help me, or what can we do?
    Thank
    Daniela

    Hello Gordon,
    that is my problem, the variable 186 is for the row, not the end of periode balance for cumulative balance due!
    For example for the end of periode of cumulative balance, i find the variable 107 and then the report sum is correct.
    The same i need for the cumulative due of all the Repetitive Area Folder in the Page or End of report folder.
    Thank´s
    Daniela

Maybe you are looking for

  • Error in DTP while loading master data

    Hi Experts, When Iam loading 0MAT_SALES attributes master data, the load is complete till PSA. But whicle executing DTP to reach its further data target "info object" I getting an error Data record 7632 ('030001DF2116VBG20V-M9‚B '): Version '030001DF

  • Safari localisation great issue.

    Hi. After installing safari 4 stable i've got problem with quick time plugins installed. As i found, it all because of language settings. When i set russian as a default language, reboot system, i've got all menus in my apps on russian. Great. But wh

  • FCE 3 Project in FCP 5

    That's it. Can my buddy, using FCP 5 open my FCE 3 project? If so, will anything be "lost" in the translation? Thanks

  • Can't get apps to load or update on iphone 4s.

    Can't get apps to load or update on iphone 4s.

  • Mail subject warning

    I really find it annoying that I can not turn off the 'no subject' warning. To suggest I should is none of anyone's business. The subject line is purely personal preference - especially since I am sending email to family. When I send email for work I