BPC 10.0 Script Logic: Combination of *FOR *WHEN *LOOKUP

Hi experts,
I'm working on a requirement to copy values from one model to another and aggregate to values.
Basically my script looks like that:
*LOOPUP OTHER_MODEL
*DIM VERSION = VERSION
*DIM TIME = TIME
*FOR %LOOP_CST% = %COSTCENTER_SET%
*DIM CST_%LOOP_CST%: COSTCENTER = %LOOP_CST%
*NEXT
*ENDLOOKUP
*FOR %SEL_CST% = %COSTCENTER_SET%
     *WHEN COSTCENTER
     *IS = %SEL_KST%
          *WHEN COST_TYPE
          *IS = "CST_NA"
               *REC(EXPRESSION = LOOKUP(%SEL_CST%), COSTCENTER = [COSTCENTER].AGGR_LEVEL, CURRENCY = "CURR_NA")
          *ELSE
                *REC(EXPRESSION = LOOKUP(%SEL_CST%), COSTCENTER = [COSTCENTER].AGGR_LEVEL, CURRENCY = "EUR")
          *ENDWHEN
     *ENDWHEN
*NEXT
*COMMIT
Unfortunately, this is not working.
If I include the for-loop inside the when-loop it is working. However, the values are multiplied based on the number of records.
Is there another possibility to solve this issue?
Thanks in advance,
Benjamin

Good Morning.
First of all thank for answering and sorry for the incomplete code.
It was only a test, I was trying to do a more dificult script but given the error I tried to simplify as much as posible the code.
The complete problem it's that I have two models (Contracts and Planning). In one of them (Contracts) the user have to introduce values in UNITS level of dimension TIME.
An example of data would be:
DIMENSION ACCOUNT_RS = PRICEM2
DIMENSION TIME = 2014.UNITS
With value = 50
In another model (Planning) I have values for another member of dimension ACCOUNT_RS for example:
DIMENSION ACCOUNT_RS = PERCENTAGEARENT
DIMENSION TIME = 2014.JAN
Value = 0.5
DIMENSION ACCOUNT_RS = PERCENTAGEARENT
DIMENSION TIME = 2014.FEB
Value = 0.3
DIMENSION ACCOUNT_RS = PERCENTAGEARENT
DIMENSION TIME = 2014.MAR
Value = 0.4
What I am trying to do is to read from model Contracts the value for the dimension ACCOUNT.
For doing this I tried to build a LOOKUP to the model Contracts in the following form:
//JAN, FEB ...
*SELECT(%MON_SEL%,MONTHNUM,TIME,LEVEL= MONTH) 
//2014, 2015...
*SELECT(%YEA_SEL%,YEAR,TIME,LEVEL = YEAR)
*LOOKUP Contracts
  *FOR %YEA_ACT% = %YEA_SEL%
  *FOR %MON_ACT% = %MON_SEL%
  //TIM_2014.JAN, TIM_2014.FEB
  *DIM TIM_%YEA_ACT%.%MON_ACT%:TIME = %YEA_ACT%
  //ACS_2014.JAN, ACS_2014.FEB
  *DIM ACS_%YEA_ACT%.%MON_ACT%:ACCOUNT_RS = PRICEM2
  *NEXT
  *NEXT
*ENDLOOKUP
*WHEN ACCOUNT_RS
*IS PERCENTAGEARENT
  *FOR %YEA_ACT% = %YEA_SEL%
  *FOR %MON_ACT% = %MON_SEL%
  *WHEN TIME
  *IS %YEA_ACT%.%MON_ACT%
  //2014.JAN ..
  *REC(EXPRESION = LOKKUP(ACS_%YEA_ACT%.%MON_ACT%) )
  *ENDWHEN
  *NEXT
  *NEXT
*ENDWHEN

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

  • Help in script logic - problem in FOR loop

    Hi Experts,
    We are using BPC 7.5 SP08. I have written a FOR loop in script logic default.lgf which is as follows:
    *FOR %TIM_MEM%=%TIME_SET%
    *XDIM_MEMBERSET TIME =%TIM_MEM%
    *WHEN P_ACCT2
    *IS "OSDU"
    REC(EXPRESSION=[P_ACCT2].[ASSTCAINVURO][P_ACCT2].[COGSUPRVIPSA]/[P_ACCT2].[ASSTUPRVTAQTY],P_ACCT2="COGSUIPSAO")
    *ENDWHEN
    *COMMIT
    *NEXT
    As per my requirement, all this members: [ASSTCAINVURO], [COGSUPRVIPSA], [ASSTUPRVTAQTY] exists for months September to next year's August. But in my input schedule, the months are from August to next year's July(which is the company's fiscal year). Consequently the loop runs for month August to next year's July while I need to run the loop 1 month late(i.e. September to next year's August). This was achieved earlier by hard-coding the time members which we cannot afford as this requires to update these hard-coded member IDs every year.
    We have also tried using the "NEXT" property of TIME dimension as follows:
    *XDIM_MEMBERSET TIME =%TIM_MEM%.NEXT
    but %TIM_MEM%.NEXT doesn't get the month in 'NEXT'.
    Please suggest if there is any way out to solve this problem.
    Thanks in advance.

    Hi Appu,
    Even if you restrict the scope using the XDIM statement, your script will just run the number of times as per the for loop. Actually, in reality, the same calculation is happening again and again, in your code; since your calculation is not based on the time member.
    To use the for loop effectively, you need to incorporate the time member in your calculation.
    Please look at the below sample code:
    *XDIM_MEMBERSET TIME = %TIME_SET%
    *FOR %TIM_MEM%=%TIME_SET%
       *WHEN P_ACCT2
       *IS "OSDU"
          *REC(EXPRESSION=<CALCULATION>,P_ACCT2="COGSUIPSAO")
       *ENDWHEN
    *NEXT
    And in your calculation, you can use statements like
    ([P_ACCT2].[ASSTCAINVURO],TMVL(1, [TIME].[%TIM_MEM%]))
    This will ensure that everytime (as per the for loop), the calculation works on separate set of data.
    Hope you got the idea.

  • How to read saved data in BPC 7 Nw Script Logic

    Hi all,
       I am trying to write the logic for Price*Quantity Calculation. This logic should be executed whenever user saves the data for either Quantity or Price.
    For this i created a Implementation on BADI "UJ_CUSTOM_LOGIC". But i am struck on how to read the data from InfoCube ,Like if user saves "Quantity",logic should read "Price" from the cube and calculate the result, Which is equivalent to GET(------) statement in SQL script Logic. Which method should i call to read the saved data in cube.
    Appreciate if someone can help me on this.
    Thanks&Regards,
    Ashok Kumar.

    Hi,
       You can use the LOOKUP instruction like:
    *LOOKUP RATE
    *DIM ENTITY2="DEFAULT"
    *DIM SOURCECURR:INPUTCURRENCY=ENTITY.CURR
    *DIM DESTCURR1:INPUTCURRENCY="USD"
    *DIM DESTCURR2:INPUTCURRENCY="EURO"
    *DIM RATE=ACCOUNT.RATETYPE
    *ENDLOOKUP
    Best regards,
    Mihaela

  • Advice on Script Management/Combining Tag for JSF

    I was hoping to get a little bit of advice/help on a custom tag that I am about to write that I can see being useful for almost any JSF developer that is writing custom JavaScript in their web application. Basically, the tag would be a script manager that would allow the developer to add scripts to their page using the tag, which would then handle duplicate scripts, do dependency management for them, and optionally combine the scripts into one file and have the final page point to taht single script.
    I've specked out below how I see the tag being used and a little bit of how it would work. I was hoping to see what you guys think about this, if you have any specific advice, or could point me in any directions that you think would help, including if this has already been done and I'm wasting my time. I definitely see myself open-sourcing this tag for others to use and to contribute to once its done.
    Thanks in advance for any help.
    - Michael
    The script manager tag would allow developers to include all script dependencies they have in their own page without having to worry about scripts already being included. Basically, if a library, such as prototype or ext, has been included earlier in the page, it would not be included again.
    On your page, you would include scripts like so:
    <scriptManager:include name="external.prototype" version="1.6" />
    <scriptManager:include name="external.ext" version="2" />
    <scriptManager:include name="connect.client" />     
    <scriptManager:include name="external.prototype" version="1.6" />
    <scriptManager:include name="connect.goals.client" />
    <scriptManager:include name="connect.goals.widget" />          Somewhere in the system would be a script translation file that maps these script definitions to source javascript files:
         <scriptManagerConfig>
              <scripts>
                   <script name="external.prototype" version="1.6" url="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js" />
                   <script name="external.ext" version="2" file="include/js/ext/ext-all.js" />
                        <dependency name="external.prototype" version="1.6" />
                   </scirpt>
                   <script name="connect.client" file="/script/Garmin/services/Client.js" />
                   <script name="connect.goals.client" file="/script/Garmin/services/GoalsClient.js" />
                   <script name="connect.goals.widget" file="/script/Garmin/widget/GoalsWidget.js" />
              </scripts>
         </scriptManagerConfig>     The above scriptManager:includes would be parsed at request scope and would generate a hash table with all of the requested script on the page inside of it without any duplicates.
    During development, this would produce the following at the bottom of the html page:
         <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script>
         <script type="text/javascript" src="include/js/ext/ext-all.js"></script>
         <script type="text/javascript" src="/script/Garmin/services/Client.js"></script>
         <script type="text/javascript" src="/script/Garmin/services/GoalsClient.js"></script>
         <script type="text/javascript" src="/script/Garmin/widget/GoalsWidget.js"></script>     Notice that "external.prototype" was included twice but was only outputted once.
    On staging and production, before generating the script tags, the contents of all of the files would be included into one. This temporary javascript file would be outputted and a script tag would be written pointing to this new file.

    Google recently released an API, which has some overlap with what you are trying to achieve here, especially with respect to script and version management. You might want to check it out to get a better idea.
    http://code.google.com/apis/ajaxlibs/

  • SAP BPC 5.1 Script Logic Issue

    Hi Guys,
    I have a problem with Inventory Days script logic at the moment. Basically what the logic should do is:
    1. Copy the required data across to a calculation category (SQL)
    2. Calculate the last 12 months Cost of Sales for every entity in the selection for 3 years (MDX)
    3. Use the Cost of Sales number and multiply it with the inventory days number (SQL)
    The calc works fine for some of my smaller brands (200 - 500 entities),  but when i run the logic for my big brand (2000 entities) the last step doesn't calculate correctly. I have done the following to try and fix the problem.
    1. Every step has it's own COMMIT
    2. I clear the data before writing anything
    3. I use XDIM_MAXMEMBERS Entity = 500
    Any ideas why the logic is acting like this? I don't know if I am allowed to post my code here, but if it will help i will
    Regards,
    Andries van den Berg

    Hi,
    I only sent you the step that is giving me a problem at the moment. I broke the logic up into different packages to check where the problem lies and narrowed it down to this one.
    It seems like the code didn't copy across correctly, it is supposed to be when EXTRAP.BRAND "<>" "". I'll just paste the code again, just so that we are all on the same page.
    Regarding the FAC2, the client was running the code a lot of times and the WB table was getting huge. So, i started posting the records to the FAC2 table and processing it in the SSIS package. And i did confirm that they are posting there.
    I just tried to run the script for half of the entities and it didn't work. I then tried to run is for 25 entities and it worked. Could the *XDIM_MaxMembers Entity =  50 be giving me the problem? This is all i get over and over in the formula log:
    RPTCURRENCY,ACCOUNT,CATEGORY,DATASRC,ENTITY,INTCO,TIME,SIGNEDDATA
    LC,80500,BUDGET,INPUT,P71559,NON_INTERCO,2010.AUG, 0
    The other thing that bugs me is that i have similar script that never gives me issues for the same client.
    Regards,
    AvdB
    //Step 4 -- Calculate the Inventory per month for all the entities selected
    *SELECT(%BUDGET_YEAR1%,"[BUDGET_YEAR1]","CATEGORY","[ID]='BUDGET'")
    *SELECT(%BUDGET_TIME_SET1%,"[ID]","TIME","[YEAR]=%BUDGET_YEAR1% AND [CALC] = 'N'")
    *SELECT(%BUDGET_YEAR2%,"[BUDGET_YEAR2]","CATEGORY","[ID]='BUDGET'")
    *SELECT(%BUDGET_TIME_SET2%,"[ID]","TIME","[YEAR]=%BUDGET_YEAR2% AND [CALC] = 'N'")
    *SELECT(%BUDGET_YEAR3%,"[BUDGET_YEAR3]","CATEGORY","[ID]='BUDGET'")
    *SELECT(%BUDGET_TIME_SET3%,"[ID]","TIME","[YEAR]=%BUDGET_YEAR3% AND [CALC] = 'N'")
    *XDIM_Memberset Time = %BUDGET_TIME_SET1%,%BUDGET_TIME_SET2%,%BUDGET_TIME_SET3%
    *XDIM_Memberset Category = TOPDOWN, BUDGET
    *XDIM_Memberset Entity = %Entity_Set%
    *XDIM_MaxMembers Entity =  50
    *XDIM_ADDMemberset ENTITY = CLKS,MUS,BS // Add global entities
    *XDIM_Memberset ACCOUNT = Last12FSCoS,Last12DispCoS, InventoryFSDays, InventoryDispDays  //Add the caculated CoS account from the previous step and the Global Driver for days
    *WHEN ENTITY.EXTRAP_BRAND
    *IS <> ""
    *WHEN CATEGORY
    *IS TOPDOWN
                       *REC(EXPRESSION=(GET(ACCOUNT="Last12FSCoS",CATEGORY="TOPDOWN")*GET(ACCOUNT="InventoryFSDays",ENTITY=ENTITY.EXTRAP_BRAND,CATEGORY="BUDGET")/365)*-1,NOADD,ACCOUNT="80500",CATEGORY="BUDGET")
                       *REC(EXPRESSION=(GET(ACCOUNT="Last12DispCoS",CATEGORY="TOPDOWN")*GET(ACCOUNT="InventoryDispDays",ENTITY=ENTITY.EXTRAP_BRAND,CATEGORY="BUDGET")/365)*-1,NOADD,ACCOUNT="80510",CATEGORY="BUDGET")
    *ENDWHEN
    *ENDWHEN
    *WRITE_TO_FAC2
    *COMMIT

  • Help in script logic

    Hi Experts,
    We are using SAP BPC 7.5 NW Version SP08. We are using a script logic that calculates the opening value of inventory(ASSTCAINVAMO) for each month except the 1st month of financial year for which the value is entered from an input schedule. The opening value of inventory of each subsequent months are calculated when the parameters for production(e.g. OSDA) are entered from a separate input schedule. The following script logic is written for the calculation:
    *FOR %TIM_MEM%=%TIME_SET%
    *XDIM_MEMBERSET TIME =%TIM_MEM%
    *WHEN P_ACCT2
    *IS "OSDA",
    REC(EXPRESSION=[P_ACCT2].[ASSTCAINVAMO]+[P_ACCT2].[RDPA][P_ACCT2].[EFFA][P_ACCT2].[OSDA]-[P_ACCT2].[CONVAMUR][P_ACCT2].[RDPU][P_ACCT2].[EFFU][P_ACCT2].[OSDU]-([P_ACCT2].[SALQAMBC]+[P_ACCT2].[SALQAMM]),P_ACCT2="ASSTCAINVAMO",TIME=TIME.NEXT)
    *ENDWHEN
    *COMMIT
    *NEXT
    The loop works fine, but it seems the list of time values are not coming in proper sequence. For example, the loop is running for 2011.NOV before it iterates for 2011.OCT. So when it iterates for 2011.NOV, it is not getting the opening value for the month and consequently 2011.DEC's opening value is calculated assuming 2011.NOV's opening value to be 0. In the input schedule the months are in proper sequence.
    Is there any way out so that the months come in proper sequence in the logic as well?
    Thanks in advance for any help.

    We had similar issue . we changed TIME members from Monthnames to numbers . i.e  changed 2011.JAN to 2011.01 . Then you get correct result  as you are expecting . Issue when using month names in combination of TMVL is that  , instead of getting 2011. MAY for TMVL(1,2011.APR) , it gets 2011.FEB . TMVL function some how takes alphabetical order instead of taking month order . Not sure if this behavior is with service pack . But never saw any thread reporting this issue .
    Anyways ,you can wait for other responses  as i am too curious to know if any one faced this issue and how did they resolve.

  • Math power function in script logic

    Hello all!
    Can anybody help me how  I can do math "power" function in BPC 5.1 Script Logic?
    Thanks

    Let's say you have a source account FOO and you want to calculate FOO to the 5th power, posting the result to FOOFIVE.
    In BPC SQL scripting, there are no mathematical functions to play with (powers, roots, sine, cosine, etc.) except for add, subtract, multiply and divide -- plus you can round results in your Factor or Expression. So that means, we must use multiplication.
    You could certainly do this using a bunch of intermediate accounts, one each for foo squared, foo cubed, foo to the 4th, and foo to the 5th. That would require *GO in between each *WHEN/REC block, and could be slow.
    I haven't tried this, but I think this should work, all in one statement:
    *XDIM_ACCOUNT = FOO
    *WHEN *
    *IS *
    REC(Factor=GET(Account="FOO")GET(Account="FOO")GET(Account="FOO")GET(Account="FOO")*GET(Account="FOO"),Account=FOOFIVE)
    *ENDWHEN
    If you want FOO to the 50th power, copy & paste.
    If you want square root of FOO, that could be a real challenge. I think to use straight BPC SQL logic it wouldn't be possible. I would probably write a stored procedure using SQL's SQRT(), and call that from the BPC logic file. Likewise for any other geometric functions, complex algebra, etc.
    There also may be a way to calculate powers in MDX -- that's more mathematically straightforward -- but as a BPC on MS person, I really never ever use MDX due to performance.
    Regards,
    Tim

  • Script Logic EDI

    Hi!
    Does anyone know if there is script logic (sap bpc) EDI?
    Thankxx!!

    HI,
    I don't know what is EDI.
    But SAP BPC has a script logic used to create calculation for aggreate members.
    Regards
    Sorin Radulescu

  • Validate my script logic: reference erro LOOKUP is not defined

    Dear all,
    i want write one script logic. It use LOOKUP using FOR/NEXT.
    But when i check stament in my script logic: messesage erro: reference erro LOOKUP is not defined.Can you help me?
    My script logic
    *XDIM_MEMBERSET ACCOUNT=BS221
    *XDIM_ADDMEMBERSET CATEGORY = Actual
    *XDIM_ADDMEMBERSET ENTITY = CSO
    *SELECT(%TIME%,"[ID]",TIME,"[ID]>=2006.01 AND [ID]<=2006.02")
    *XDIM_MEMBERSET TIME = %TIME%
    *LOOKUP Rates
    *DIM  CATEGORY ="Actual"
    *DIM R_ACCOUNT ="AVG"
    *DIM R_ENTITY ="Global"
    *DIM INPUTCURRENCY="USD"
    *DIM MEASURES ="PERIODIC"
    *FOR %T% = %TIME%
    *DIM RATE_%T%: TIME =%T%  
    *NEXT
    *ENDLOOKUP
    *WHEN ACCOUNT
    *IS "BS221"
    *FOR %T1% = %TIME%
    *REC(EXPRESSION=LOOKUP(RATE_%T1%),TIME=%T%)
    *NEXT
    *ENDWHEN
    *COMMIT
    Thanks,
    Hungth

    Dear Vadim,
    I want test LOOKUP statement using FOR/NEX, then get value per member for member in LOOKUP.
    in excel add-in of Rates Model:
    Actual - Actual
    Average Rate
    Global Entity
    2006.01 - Jan 2006
    31
    2006.02 - Feb 2006
    30
    2006.03 - Mar 2006
    30
    2006.Q1 - Q1 2006
    30
    I want run my script logic above to get value from Rates Model ( 2006.01: 31, 2006.02 : 30, 2006.03: 30 ) to current model , to calculate in crurrent model.
    BS221 - Long Term Debt
    2006.01 - Jan 2006
    2006.02 - Feb 2006
    2006.03 - Mar 2006
    Actual - Actual
    31
    30
    30
    How i can write my script logic? My script logic statements is correct??
    Thanks,
    hungth

  • Script Logic error when trying to Calculate P*Q

    I am new to MDX and Script Logic and need some help. 
    I am trying to calculate Price * Qty.  Prices are stored in an Account called Unit_Price, and Qtys are stored in Accounts as well.  We have a Service property called "DRIVER" that points to the Account that holds the Q for that Service, but I can't seem to refer to it in Script Logic.  So, for each Service, I want to find the corresponding Unit_Price, lookup the Driver for that service and then use that to find the corresponding Quantity.  However, I'm having trouble with the portion that points to the Quantity. 
    Can someone please help? 
    This is the error that I get when I try to run it in the Logic Debugger: 
    "Warning no. -2147467259 reading cell 0; The hierarchy '[SERVICE.DRIVER]' was not found in the cube when the string, [ACCOUNT].[SERVICE.DRIVER],was parsed. "
    Here is my Script Logic:
    *MEMBERSET(%BILL_ENTITY%,FILTER(DESCENDANTS([ENTITY].[547],99,LEAVES), [ENTITY].CurrentMember.Properties("BILLED_ENTITY")="X") )
    *XDIM_MEMBERSET ENTITY = %BILL_ENTITY%
    *MEMBERSET(%PQ_SERVICE%,FILTER(DESCENDANTS([SERVICE].[TOTAL_SERVICE],99,LEAVES), [SERVICE].CurrentMember.Properties("ALLOC_METHOD")<>"") )
    *XDIM_MEMBERSET SERVICE=%PQ_SERVICE%
    *XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
    *XDIM_MEMBERSET TIME = %TIME_SET%
    *XDIM_MEMBERSET DATASRC = INPUT
    *FOR SERVICE.ALLOC_METHOD = "PQ" 
                [ACCOUNT].[#16404ZZZ] = ( [ACCOUNT].[UNIT_PRICE], [TIME].currentmember) * ([ACCOUNT].[SERVICE.DRIVER], TIME].currentmember)
    *NEXT           
    *COMMIT

    1. completely uninstall all the nokia PC Suite products with this http://nds1.nokia.com/files/support/global/phones/software/Nokia_PC_Suite_Cleaner_7_1_1.exe, and also uninstall all OVI Suite products
    2. reboot pc
    3. download & Install a fresh copy of PC Suite
    4. it will then have you download and install a new version of the software installer after you connect your e90
    it should be fine after that. i had to do the same thing a while back.
    re: no able to sync the calendar with ovi suite:
    go to the Sync drop down and then select Sync Calendar.
    hope that helps

  • BPC 7.5 MS SP5 wrong numbers multiplying GET (A)*GET(B) in script logic

    Hi experts,
    We are migrating from BPC 5.1 MS to 7.5 MS SP5 and there have some scripts that are using GET function that retrieve wrong numbers. Particularly, it does not record the decimals figures.
    Example1 (multiply): when A=2,3 and B=4,4, then AB=10,12. But doing this in script logic GET(A)GET(B)=10. It does not write the decimal figures.
    Example2 (addition): when A=2,3 and B=4,4, then AB=6,7. But doing this in script logic GET(A)GET(B)=6. It does not write the decimal figures.
    Particularly, the script we are executing is the following. This script worked ok at 5.1 but not at 7.5:
    *XDIM_MEMBERSET ACCOUNTL= INFLA_AUX,INFLA_ACUM
    *XDIM_NOSCAN ACCOUNTL = INFLA_ACUM
    *XDIM_MEMBERSET CATEGORY=%CATEGORY_SET%
    *XDIM_MEMBERSET CURRENCY=LC
    *XDIM_MEMBERSET TECHNOLOGY = %TECHNOLOGY_SET%
    *XDIM_MEMBERSET PEM=DESCENDANTS([PEM].[PEMTOT],999,LEAVES)
    *XDIM_MEMBERSET TIME=DESCENDANTS([TIME].[XXXX.TOT],999,LEAVES)
    *CALC_EACH_PERIOD    
    *WHEN ACCOUNTL
    *IS INFLA_AUX
         *WHEN TIME.YEAR
         *IS = PEM.YEAR
    *REC(EXPRESSION=1,NOADD,ACCOUNTL=INFLA_ACUM)
                *IS < PEM.YEAR
    *REC(EXPRESSION=0,NOADD,ACCOUNTL=INFLA_ACUM)         
                *IS > PEM.YEAR
    *REC(ACCOUNTL=INFLA_ACUM,NOADD,EXPRESSION=GET(ACCOUNTL="INFLA_ACUM",TIME=PRIOR) * GET(ACCOUNTL="INFLA_AUX",TIME=PRIOR))     //in this sentence!!!!!!
              *ENDWHEN
    *ENDWHEN
    *COMMIT
    We have SIGNED_DATA_FORMAT (25,10) in the application parameters.
    Many thanks for your attention.
    Best regards,
    Arkaitz
    Edited by: arkaitz_orozko81 on Apr 28, 2011 4:31 PM
    Edited by: arkaitz_orozko81 on Apr 28, 2011 4:33 PM

    Hello,
    We have solved this issue.
    First, we have change the script:
    *SELECT(%PEM_APLICA%,[ID],PEM,"APLICA='Y'")
    *XDIM_MEMBERSET ACCOUNTL=PROD_AUX,DISP_INP,HORA_AUX,CAPAC_AUX
    *XDIM_NOSCAN ACCOUNTL= PROD_AUX
    *XDIM_MEMBERSET CATEGORY=%CATEGORY_SET%
    *XDIM_MEMBERSET CURRENCY=LC
    *XDIM_MEMBERSET TECHNOLOGY=DESCENDANTS([TECHNOLOGY].[RENOVABLES],999,LEAVES)
    *XDIM_MEMBERSET PEM=%PEM_APLICA%
    *XDIM_MEMBERSET TIME=<ALL>
    *WHEN ACCOUNTL
    *IS CAPAC_AUX
    //*IS *
         *WHEN SIGNEDDATA
         *IS <> 0
    REC(ACCOUNTL="PROD_AUX",NOADD,EXPRESSION=GET(ACCOUNTL="CAPAC_AUX")* GET(ACCOUNTL="DISP_INP")* GET(ACCOUNTL="HORA_AUX"))
         *ELSE
    *REC(ACCOUNTL="PROD_AUX",NOADD,EXPRESSION=0)
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    And we have change the regional settings to "English (United States)".
    Many thanks for your answer.

  • 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.

  • Send parameter from one script logic to another. SAP BPC 7.5 NW.

    Hello!
    Before i start, want to apologize for my English.
    We work on SAP BPC 7.5 for NetWeaver.
    In general,  we want to send parameter from one Script logic file to another script logic file.
    I will explain why :
    1. We have parametr like %C_CATEGORY_SET% (and another four parameter, like groups, currency and etc.) that work on one script(next, i will named it A_Script). 
           We will send this parametr from BPC EXCEL (we will create button, then use command MNU_eData_SelectPackage(we also set parameters) and run package that we need, also before we set script for this package by the SAP Guide. We send some data, and this A_Script work good. Everything that we want from this script work correctly. )
    2. Next we create another script(B_Script) , and we want use %C_CATEGORY_SET%, but we don't know how use this parametr, if we will just write this parametr on Script Logic,  apears error ("C_CATEGORYDATAVALUE" is not assigned to the Data Administrator). We try to solve this problem by using System_Constants.lgf, but we get error.
    Code:
    *DIM C_CATEGORY          WHAT=%C_CATEGORY_SET%;             WHERE=<<<;                   USING=<<<;    TOTAL=<<<
    *DIM C_ENTITY                 WHAT=%ENTITYSET%;                         WHERE=<<<;                  USING=<<<;      TOTAL=<<<
    *DIM GROUPS                   WHAT=%GROUPS_SET%;                    WHERE=<<<;                  USING=<<<;     TOTAL=<<<
    *DIM RPTCURRENCY         WHAT=%RPTCURRENCY_SET%;         WHERE=<<<;                  USING=<<<;      TOTAL=<<<
    *DIM TIME                          WHAT=%TIME_SET%;                          WHERE=<<<;                  USING=<<<;     TOTAL=<<<
    If we will change %C_CATEGORY_SET% for  ACTUAL, and also change another parameters, script will work, package will run correctly. But we need using parameters, because we didn't exactly what will choose our client.
    Our question have BPC Script Logic some kind of Globar Parameter(Variable), that we will set in A_Script, and then use them on B_Script?
    How can we define parameter from another script logic, maybe we should send it?
    Should we use System_Constants for solving this problem, if yes, how?
    Any help will be appreciated
    Best Regards,
    Erlan Kadraliev
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:50 PM
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:58 PM
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:59 PM

    Hi Ethan Jewett 
    1. About %ENTITYSET% it is normal. Before this line  i write :
    *SELECT(%ENTITYSET%, "ENTITY", GROUPS, "[ID]=%GROUPS_SET%")
    So it is not this problem. %ENTITYSET% just parameter, that i used.
    2. Are you running the scripts using the same data manager package? I am running two different package for 2 different Script.
    For example aPackage for aScript, and bPackage for bScript.
    My questions was how can i send parametr from one script to another, for example i can run another script by using BADi command Runlogic, but how can send parameter that i need to used on another script. I have for example parameter %GROUPS_SET% (CG001) on aScript, but i can't get this parameter on another script, if i write %GROUPS_SET% i will get error  ("GROUPSDATAVALUE" is not assigned to the Data Administrator)
    OR
    Maybe if you will answer for next question, i will be able solve problem , How can i send parameter CG001 (this is %GROUPS_SET%, for example it stay in EXCEL in cell A5) from excel to script logic by running package. Maybe i can get cell value on Dynamic Script Data Management?  
    My Dynamic Script on bPackage
    PROMPT(RADIOBUTTON,%CHECKLCK%,"u0412u044Bu0431u043Eu0440 u0431u0430u0437u043Eu0432u043Eu0433u043E u043Fu043Eu043Au0430u0437u0430u0442u0435u043Bu044F.",1,{"u0412u0441u0435u0433u043E u0410u043Au0442u0438u0432u044B","u0421u043Eu0431u0441u0442u0432u0435u043Du043Du044Bu0439 u043Au0430u043Fu0438u0442u0430u043B","u0412u044Bu0440u0443u0447u043Au0430 u043Eu0442 u0440u0435u0430u043Bu0438u0437u0430u0446u0438u0438","u0414u043Eu0445u043Eu0434 u0434u043E u043Du0430u043Bu043Eu0433u043Eu0431u043Bu0430u0436u0435u043Du0438u044F u043Eu0442 u043Fu0440u043Eu0434u043Eu043Bu0436u0430u044Eu0449u0435u0439 u0434u0435u044Fu0442u0435u043Bu044Cu043Du043Eu0441u0442u0438"},{"BPAST_ALL","BPEQ","BPPROCE","BPOPIN_GO"})
    INFO
    (%EQU%,=)
    INFO
    (%TAB%,;)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,CHECKLCK%EQU%%CHECKLCK%%TAB%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,MYTEST_145.LGF)
    Best Regards,
    Kadraliev Erlan

  • BPC 7.5 Upgrade - Script Logic Toolbar missing

    Hello,
    We are moving from BPC 5.0 to 7.5. In the process of testing we found that the script logic window no longer has the toolbar that allows us to change the font type, font size, do pretty print...
    Is there a setting to get this?
    Also, we have noticed that the 'Administration Help' link on the bottom right hand corner of the BPC Admin screen no longer shows up.
    On BPC for Excel, the e-Analyze, e-Publish, e-Submit.. no longer have their own 'help'....
    Please let me know if you need additional information...
    Regards,
    Venkat

    Help is a separate icon on top of Action Pane right now.
    But the hellp still exist and can be reach from any section.
    Regarding the scriptlogic we are speaking about text files.
    So for print you just can copy into notepad or any other editor addyour format and you will be able to print.
    Regards
    Sorin Radulescu

Maybe you are looking for