Balance carry in script logic

Time counter loop
I need to copy the 'Jan' closing balance from Account A to copied Account B of the following year'Jan'.
This I need to do it for 7 years planning values by user defined 50 profit centers
I am using time counter in the beginning...like following
*FOR %COUNTER% = 0,12,24,36,48,60
*XDIM_MEMBERSET TIME =TMVL(%COUNTER%,%TIME_SET%)
*XDIM_MEMBERSET RPTCURRENCY= LC
*XDIM_MEMBERSET CATEGORY= %CATEGORY_SET%
*WHEN ACCOUNT
*IS ACCOUNT'1'
*REC(ACCOUNT='ACCOUNT '2', TIME=TMVL(%COUNTER%,%TIME_SET%),CATEGORY=%CATEGORY_SET%)
*ENDWHEN
*COMMIT
*NEXT
It is not posting to following year. Can some one suggest what I am missing in the recording logic.
It need to be calculated for one after another year in loop and it part of major other calculation.

Hi,
You mentioned that you want to:
Copy 2011.JAN -> 2012.JAN ,
2012.JAN -> 2013.JAN ,
2013.JAN -> 2014.JAN and for further for 7 years.
Lets say, this script is run in 2011.JAN.
In that case, do you have any data in 2012.JAN to be copied to 2013.JAN? If no, then the suggested script will work absolutely fine.
In the other case, lets say you already have values in the jan month of the subsequent years, then you should first copy them to the next year, before overwriting them. You can try something like below:
*XDIM_MEMBERSET RPTCURRENCY= LC
*XDIM_MEMBERSET CATEGORY= %CATEGORY_SET%
*FOR %COUNTER% = 60,48,36,24,12,0
   *WHEN TIME
   *IS TMVL(%COUNTER%,%TIME_SET%)
      *WHEN ACCOUNT
      *IS ACCOUNT1
         *REC(ACCOUNT=ACCOUNT2, TIME=TMVL(%COUNTER%+12,%TIME_SET%))
      *ENDWHEN
   *ENDWHEN
*NEXT
Hope this helps.

Similar Messages

  • Script logic not working for GL account with Zero balance

    Dear Experts,
    I have a scenario where the GL account balance in ECC is 0  and when a script logic runs in BPC the same should capture a closing balance as "1".
    Though I have written the below logic, this is not getting executed and writing back the value as "1".
    Kindly help me on the same.
    *WHEN ENTITY
    *IS "ABC"
    *WHEN ACCOUNT
    *IS "20300000"
    *REC(EXPRESSION = 11, ACCOUNT = 20300000,FLOW = F99, ENTITY = ABC, PROFITCENTER  = 130010 ,  INTERCO = I_NONE , CONSOSCOPE = G_NONE, CURRENCY = LC ,CATEGORY = ACTUAL, AUDITID = INPUT)
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    Regards,
    Shilpa

    Hello Vadim Kalinin,
    Thanks for the very swift help.
    Merger of the client happened in 2007. ECC is using the " 20300000- change in fair value " account to record both pre-acquisition and post-acquisition values.
    Since the treatment of pre-consolidation and post consolidation reserves is different the split of the amount between pre and post-acquisition values has to be done. For the same post acquisition value is reduced from this account using a script logic as below.
    WHEN FLOW
    *IS "F99"
    *WHEN ENTITY
    *IS "ABC"
    *REC(EXPRESSION = ([ACCOUNT].[20300000] -3258603),ACCOUNT = 20300000,FLOW = F99,  INTERCO = I_NONE , CONSOSCOPE = G_NONE ,CURRENCY = LC ,CATEGORY = ACTUAL )
    This logic worked when the account has a figure, but in July 2014 in ECC the account had a transaction and the balance has become Zero. Until this account has a figure this pre acquisition logic is not working.
    For making this work, I am trying to write a new logic to make the balance of this account as "1" in BPC through the script logic.
    Kindly suggest me on the same.
    Regards,
    Shilpa

  • Balance Carry forward and Consolidation

    Dear Friends,
    I am completed the one cycle of consolidation using three methods in example cycle.... but I am facing the problem in balance carryforward after completing the one cycle of consolidation.
    Can anyone please help me to understand the whole process of carryforward the balance after completing the one cycle of consolidation and after completing the carryforward how to run again the consolidation run what are the effects.
    Thanks and regards,
    MD.

    Hi,
    What is the problem with CarryForward? Does it succeed or fail? Does it move figures around? Please post a screen-shot of your CopyOpening Business Rule table and script logic so I can tell you why it isn't working.
    Typically you would carry forward all Balance Sheet figures from 20X0.DEC to 20X1.JAN, and from the closing flow (or acctdet) to the opening. You would normally do this for Input-type DataSrcs (up to Consolidation adjustments).
    Once you have a Balance Sheet in opening flow for 20X1.JAN, you would then load 20X1.JAN's closing trial balance for the same month into closing flow.
    Consolidation will run on YTD BS figures and work in exactly the same way as in the first year.
    Please be more specific if you need any more info.
    Tom.

  • Balance Carry Forward issue

    When doing a balance carry forward, the retained earning accounts carryforward is appearing under the P&L carryforward as opposed to the balance sheet process. Due to this, the retained earnings carryforward is only happening at the GL account + Co Cd level (and PCA if doing a PCA carry forward). WE need it to be in the Balance Sheet carry forward so it can be rolled over at a more detailed level (namely Trading partner, Transaction type etc).
    Since retained earnings account is a Balance sheet account, it would be safe to assume that it would appear under the Balance Sheet carryforward process. However, because that is not happening and its being included in the P&L carryforward, manual reclass entries need to be posted with the correct code block elements.
    Does anyone know if this is something maintained at a configurational level? Any help would be highly appreciated.

    At the year-end, you "roll over" all of your P&L account balances to the retained earnings account (which is a balance sheet account) so you could show the P+L result in the balance sheet in the equity section.  It is very logical that you see the retained earnings account in the P&L carryforward.  In FS00, all of your P&L accounts have a retained earnings account type (X, e.g.) that is linked to a GL account (which is the retained earnings balance sheet account).  Balance sheet accounts in FS00 are not assigned to any retained earnings acct type.

  • BPC10NW: Error while running Balance Carry Forward

    Hi,
    I am trying to run 'Balance Carry Forward' (COPYOPENING) to copy opening balances from 2010.DEC to 2011.JAN.
    The 'Opening Balances' package fails with "RUN_LOGIC:Cannot find document/directory" error.
    The Copyopening.lgf is available and is been validated successfully.
    We have refered to the below link but still the opening balances is failing with the same error.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70657540-106d-2e10-8393-d702056767a4?QuickLink=index&overridelayout=true
    Any suggestions?
    thanks in advance,
    M.S

    Hi,
    I have found similar issues with business rules in v10.
    Can you just try to include this in Default logic and see if you can get it to run from a sent record. I know that this is not necessarily the nicest approach as you would normally like to run the package from DM, but I could not get certain things to run from DM.
    If (like me) you can get it to run via Default, you could then trigger this by sending a dummy record to a dummy account.
    I know it's not ideal but until this is fixed (I think it may be a bug) then this could be a solution.
    Let me know if this helps at all.
    Tom.

  • F.07 customer balance carry forward doubts

    Hi folks,
    i have some concerns about T-code F.07.
    1. Can we run this Tcode more than one time for a particular customer account for the same fiscal year? If it's allowed what will happen?
    2. For the record in KNC1 table, if we run the F.07 twice, what will happen? will the system created two records, or the second run will update the first run. eg. the first carry forward have the amount 400. and after carry forward this is another invoice posted wit amount 100 with the posting day in the previous fiscal year, so will this 100 carry forward automaticly? or need to run the balance carry forward again for this customer ? and what's the records looks like in table KNC1 for these three phase?
    thanks in advance

    Mr. Dave,
    If after the balance carry forward from the Previous year to the current year (whether AR/AP/GL) and an entry is passed in the previous year... if the balances are not getting updated, what could be the reason.
    For example, if a GL Account has a balance of 400 and the balance is carried forward to next year. Then another 100 is passed to the same GL Account but in the previous year. Then according to you (and as per logic), the last year closing balance and the current year opening balance shall become 500. But, after posting this new entry of 100, both the balances remain at 400. and we are again having to do a balance carry forward. What could be the reason for this and how we can avoid this.
    Regards
    Siddique

  • G/L Accounts Balance Carried Forward

    Hi,
    Is there any way to find the G/L Accounts Balance Carried Forward? Tables, Functıon Modules etc...
    Thanks!
    Best Regards
    Beserithan

    Hi,
    it depends if you are using New GL (available since MysapERP2004).
    Carried forward balance is in period 0 in SAP; either GLT0 (Old geneal ledger) od FAGLFLEXT.
    If you look at logical database SDF: Old general ledger values are fetched from GLT0, new general ledger values are transfered to GLT0 structure using function 'FAGL_GET_GLT0'.
    Regards,
    Clemens
    Regards,
    Clemens

  • Reg balance Carried forward in F.27 Accounting Statement Print

    Hi experts,
    We have generated a SAP Script for Accounting Statement print ( F.27 ) for vendors. We have used structure RF140 for
    the necessary fields. For balance carried forward, SALDO in RF140 structure( balance in document currency ) gives
    me the correct value. But i'm unable to trace whether the balance carried forward is debit or credit. How to check whether
    this balance is debit or credit.
    Thanks in Advance.
    Regards,
    Farhanaz.

    hi ,
    check tcode FK10 might help you.
    regards
    Prabhu

  • Hierarchy to use in Script Logic

    Hello Experts
    I am trying to transfer the Profit/(Loss) from P&L to Reserve Account in the Balance Sheet by running a script logic.
    I am using BPC 10 NW 7.4
    The hierarchy of  P&L, is designed to calculate the Profit of Loss for the period. I wrote the script by selecting node in the hierarchy and transfer to reserve account. However it is not working.
    To test my logic, instead of hierarchy, I tried with a base level account member, it is working.
    Following is the body of my logic.
    WHEN ACCOUNT.PARENTH1
    IS <P&L AFTER TAX> // The node which aggregate the value
    REC (EXPRESSION = %VALUE%, ACCOUNT = <RESERVE ACCOUNT>)
    How could I resolve it?
    Your expert ideas are much appreciated
    Kind Regards
    Abraham

    Hi Abraham,
    Nodes are not looped in WHEN/ENDWHEN, only base members.
    If you want to copy the node value to some target the best way is:
    *XDIM_MEMBERSET ACCOUNT=BAS(SOURCENODE)
    *WHEN ACCOUNT
    *IS * //scoped as base members of node
    *REC(EXPRESSION=%VALUE%,ACCOUNT=TARGETBASE)
    *ENDWHEN
    B.R. Vadim

  • Use of MEASURES dimension in a RUNALLOCATION in a script logic

    Hi everybody,
    We are trying to use MEASURES dimension inside a RUNALLOCATION in a script logic, because we need to work with the information at a YTD element
    Example:
    It works:
    *XDIM_MEMBERSET C_CATEGORY=%C_CATEGORY_SET%
    *XDIM_MEMBERSET TIEMPO=%TIEMPO_SET%
    *XDIM_MEMBERSET PRODUCT=BAS(TOT_PRODUCT)
    *XDIM_MEMBERSET MARKET=BAS(TOT_MARKET)
    *RUNALLOCATION
              *FACTOR=USING
              *DIM ACCOUNT     WHAT=Cost;          WHERE=Import;           USING=Units;
    //        *DIM MEASURES    WHAT=PERIODIC;      WHERE=PERIODIC;         USING=YTD;  
              *DIM CLIENT      WHAT=CLIENTE_NA;    WHERE=>>>;              USING=BAS(TOT_CLIENT);
    *ENDALLOCATION
    *COMMIT
    It doesn't work:
    *XDIM_MEMBERSET C_CATEGORY=%C_CATEGORY_SET%
    *XDIM_MEMBERSET TIEMPO=%TIEMPO_SET%
    *XDIM_MEMBERSET PRODUCT=BAS(TOT_PRODUCT)
    *XDIM_MEMBERSET MARKET=BAS(TOT_MARKET)
    *RUNALLOCATION
              *FACTOR=USING
              *DIM ACCOUNT     WHAT=Cost;          WHERE=Import;           USING=Units;
              *DIM MEASURES    WHAT=PERIODIC;      WHERE=PERIODIC;         USING=YTD;  
              *DIM CLIENT      WHAT=CLIENTE_NA;    WHERE=>>>;              USING=BAS(TOT_CLIENT);
    *ENDALLOCATION
    *COMMIT
    How can we do it? Is possible to use Measures dimension?
    Any idea out there?
    Kind regards
    Albert Mas

    Hi Albert,
    I believe you are correct that using MEASURES in this way is not possible. Depending on whether you have data in future periods, you may just be able to use the time dimension instead of the measures dimension:
    *DIM TIME WHAT=2010.AUG; WHERE=2010.AUG; USING=2010.TOTAL;
    You could also manually maintain a property and select on the property to do the same thing, which would allow you to exclude future periods.
    Another option might be to make your Units account a balance sheet account, which should make it always behave as a YTD value, or create a second UNITS_YTD account as a balance sheet account and populate it with the Units YTD value using script logic before running the allocation, then use the UNITS_YTD account as your allocation driver.
    Ethan

  • Script logic from BPC 5 in BPC 7.5

    Hi,
    I am trying to use some script logic from an appset in BPC 5 in BPC 7.5. When I validate the logic in 5 it works fine but in 7.5 I get validation errors.
    They relate to properties of dimension elements that are not currently used (neither in 5 nor in 7.5) but could well be used in the future. As an example, this bit generates an error
    *WHEN ACCOUNTL.RATETYPE
    *IS END,ENDFLOW
    I currently do not have an account defined with ratetype END but it is quite possible that there will be one in the future. And END is defined as an element in the RATE dimension.
    So, why did BPC 5 accept this and BPC 7.5 does not? And, is there a way around other than defining a dummy element in ACCOUNTL that used ratetype END?
    Thanks
    Edited by: ArnoldWarhonowicz on Aug 5, 2010 4:06 PM

    What I havenoticed is that with the new7.5 Script logic, there are more checks and balances performed during the validation.  So, if you have only AVG, ENDRATE on RATETYPE property and no END for any member, yet your logic is calling a set of members with this parameter, the logic fails to validate. I assume the process is checking for a set of END members based on the request. Since they don't exist, the error occurs.  But I would request that BPC Support verify the behavior as well.
    If you remove END, does the logic validate?
    Hope this helps.

  • Dimension Formula versus Script Logic that runs on default

    Hi Experts,
    Which is better to use dimension formula or script logic that runs on default? We have a lot of dimension formulas and when noticed that it has a huge impact in the performance of our AppSet. When we try to remove them, the performance seems better. We we're thinking of transforming these dimension formulas into script logic which will run by default instead. Right now I'm hesitant with two things, 1.) Will there be improvement in performance if I all these formulas are run at default via script logic? 2.) The maintenance seems to be much more complex for the user if we use script logic.
    Thanks,
    Marvin

    Hi Marvin,
    Actually you pointed very well the advantage and disantavage regarding dimension formula.
    Dimension formula are executed into run time which means that value are not calculated. Of course this will have an impact regarding performances.
    Usually our recommendation is to use dimension formula just when yoiu have KPI's to calculate which will be very difficult to be implemented into SQL scrip logic or when you have very simple calculation like Account A = Account B+ Account C.
    For other calculation we advice our customer to use script logic.
    But attention:
    Default formula should not become very heavy because you will arrive into other issue with performances.
    When you will send data if default formula script will be heavy you will arrive into situation to wait may be minutes just to send one figure and of course this will be not acceptable for users.
    So you have to use script logic but you have to run into batch mode (schedule package) that script logic.
    Into default formula you have to keep just minimum (you have to calculate just figures which have importance for user imediat, real time).
    Also you have to be aware that moving dimension formula into scrip logic actually your fact table will grow a lot because the number of records generated will be probably 3-4 times bigger than number of records from fact table with dimension formula.
    Maintenance of script logic is more complex than dimension formula and you pointed very well this.
    So it is a balance and I tried o provide you suggestions or best practice when you have to use dimesnion formula and you have to avoid dimension formula.
    I hope this will help you to arrive to best combination for your application.
    Kind Regards
    Sorin Radulescu

  • Balance carry forward at end of page in adobe forms

    Hello all,
    I am new to adobe forms.
    I have a table with data with amount column. when the content of the table flows to next page i need to get balance carry forward and page to total and same at next page top as below
    I got to know we need to write script to get this but I don't know script in adobe form.
    So kindly help me.
    Regards
    ujwal

    Hi Ujwal,
    You're script could be handled something like this:
    if(xfa.layout.pageCount() > 1){
    var page = xfa.layout.page(this) - 1;
    var fields = xfa.layout.pageContent(page, "field");
    var total = 0;
    for(var i = 0; i < fields.length; i++)
      var item = fields.item(i);
      if(item.name == "CARRYFORWARD")
        total = total + item.rawValue;
    this.rawValue = total;
    I'm not sure what your technical name for the carry forward value is so I made one up in the sample.  Also, I have used this in one form but at line 02 I had to use -2 instead of -1 for my form even though the scripting help gives -1 as an example.  This will simply check if there is more than one page and if so then it will look back at the previous page to get the value of any field named CARRYFORWARD.
    Regards,
    Ryan Crosby

  • Can we run script logic at the time of preparing reports.

    Helo Everybody!
    I am new to SAP BPC.
    Can we run script logic at the time of preparing reports.
    Thanks & Regards,
    Satish.

    If you mean, "Can we run script logic at the time of preparing reports" is equivalent to entering data into the report and sending it to the database, then yes, you may run logic as Marcel indicates.  Defualt logic is ALWAYS run for ANY and EVERY set of data that is sent via an input template from the field.  You may also run logic when posting a jOURNAL entry as well.  But be careful....if default logic attempts to perform to MANY or COMPLEX calculations, the time it takes to complete the process may not be in expectations with the users plans.  There is a fine design balance required when planning to run logic at the time of input, as opposed to running in a package or at specific times during the day.
    Hope this helps.

  • Script Logic - Scoping Statement Challenge

    Dear Friends,
    I have a requirement where I need to write a script logic to calculate the net of all Balance Sheet accounts which are under a Hierarchy node (say: BALANCESHEET) and post the reversal to another Account (say: 9999999) which is also located under the hierarchy node: BALANCESHEET
    Now the tricky bit is to exlcude the posting account (9999999) when I am reading the Accounts under the hierarchy node: BALANCESHEET.
    Anyone knows how to do it ?
    Below is my code which only works when the Account: 9999999 is located outside of the hier node: BALANCESHEET
         *XDIM_MEMBERSET ACCOUNT = BAS(BALANCESHEET)
         *XDIM_MEMBERSET TIME = 2014.APR
         *WHEN TIME
         *IS 2014.APR
         *REC(FACTOR = -1, ACCOUNT=9999999)
         *ENDWHEN
    The scoping statement I wish that would work is:
         *XDIM_MEMBERSET ACCOUNT = BAS(BALANCESHEET), BUT EXCLUDE 9999999
    Appreciate any response on this.
    Thanks,

    Hi Vadim,
    I was hoping you would respond.
    Your code worked like a charm!!
    I never know until now that we could use the below statement prior to *SELECT statement and use that variable within succeeding *SELECT statement.
    *XDIM_MEMBERSET ACCOUNT AS %ACCT% = BAS(BALANCESHEET)
    Because before I tried below with no luck but never knew about above statement.
    *SELECT(%ALLBSEXIMBAL%,"[ID]",GL_ACCOUNT,"[ID]=BAS(CBS) AND [ID]<>2199999")
    Even the SAP Help doesn't have the above syntax in their documentation, how did you know about it??
    You are a genius.
    Thanks very much for helping out
    Cheers!

Maybe you are looking for