BPC 7.0 MS Script-Logic problem: New values used, old values written?

I am trying to using BPC Script logic to update my Sales cube, specifically Revenue=Units*Price and Price=Revenue/Units using the "Price" stored in a seperate Price cube.
Inside default.lgl, I am *INCLUDE-ing my own script:
*LOOKUP PRICES
*DIM PREIS:ACCOUNT="Price"
*ENDLOOKUP
*WHEN ACCOUNT
*IS "Units"
*REC(FACTOR=LOOKUP(PREIS),ACCOUNT="Revenue")
*IS "Revenue"
*REC(EXPRESSION=%VALUE%/LOOKUP(PREIS),ACCOUNT="Units")
*ENDWHEN
*COMMIT
Now, when I insert new "Units" values using the std. Excel template, strange things happen:
- The Revenues seems to be computed and updated correctly in the cube (if I check them using excel templates, they show up).
- The Units seem to have the values they had before... seems they get old values ?!
E.g. if I have several write operations say, I write units=2,3,4 and price is constant 10,
the values in the cube seem to be (table):
value written, units in cube, revenue
3 , 2 , 30
4,  3 , 40
The new value is somewhere in the MS Analysis cube, otherwise, how could later be the new value be shown, although the excel templates seem to show old values?
Any explanation for that strange behaviour?

I simplified and wrote the prices in the same cube as I send the data from with the excel template.
I tried using:
*WHEN ACCOUNT
*IS "Units"
[Account].[#Revenue]=[Account].[Units]*[Account].[Price]
*ENDWHEN
*COMMIT
*WHEN ACCOUNT
*IS "Revenue"
[Account].[#Units]=[Account].[Revenue]/[Account].[Price]
*ENDWHEN
*COMMIT
Now, if units are send from the excel template, revenue is calculated correctly.
If I enter revenue instead, seems that the 1st block is executed as well (why????!!!/how to avoid - I use *WHEN - what else should I do? )  which would explain the behaviour I get the old values for Units and Account again...
Related: How can I use "*WRITE_TO_FILE"? I tried both
*WRITE_TO_FILE Mylog.txt
*WRITE_TO_FILE "Mylog.txt"
But I can't find these file after sending data through the excel template... Do I have to create the files manually first or give full Path Names?
Thanks!

Similar Messages

  • Script logic problem BPC 7.5

    Hi!
    We have a script logic that worked fine in BPC 5.1 but after our upgrade to BPC 7.5 it doesn´t work anymore.
    I will try to explain the part of or logic that doesn´t work anymore.
    We have 2 lines that will pass through the script, each line creates a temporary value  on KATEGORI ="#avskr1").
    Depending on the value created on  u201C#avskr1" it should do calculation A if the value is negative and calculation B if the value is positive. To do this we the following script logic:
    *WHEN GET(KATEGORI="#avskr1")
           *IS < 0
    *Calculation A
    ELS
    *Calculation B
    And this logic worked fine in BPC 5.1.
    If line X had -50 as a value in  u201C#avskr1"   and line Y had 75 as a value  in u201C#avskr1" , calculation A would be performed on line X and calculation B on line Y
    With the same example as above in BPC 7.5 calculation A will be performed on both lines.
    But if I change the logic to the following script logic in BPC 7.5:
    *WHEN GET(KATEGORI="#avskr1")
           *IS  = -50
    *Calculation A
    ELS
    *Calculation B
    Calculation A would be performed on line X and calculation B on line Y. It seems like the logic can´t handle <> signs in this script logic anymore.
    Regards
    Fredrik

    Hi!
    Unfortunately it didn´t help still the same error.
    And I just got an answer from SAP Support that there are a bug in the use of "Get whith When or lookup" in 7.5 SP03 which we currently are using, but it has been fixed in SP04. They just put up a SAP not 1515973 about the issue.
    Unfortunately they have no work around for this problem so I don´t know how to solve it untill we have installed SP04.
    Regards
    Fredrik

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

  • 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

  • Cant able to see new value and old value for change in purchase order text

    Hi all ,
    I am not able to see changes done in material's purchase order text in material master. When i use tcode MM04 to see changes done material master it does not report new and old value for change if it is done in purchase order text of that material .
    Thanks in advance  ,
    Shikha

    Hi Shikha,
    I'm not sure it works or not. But you can try SCU3 t.code and table DBTABLOG. May it can help you out.
    I also faced this type of issue in Plant data and it get resolved.
    Try and let me know...
    Regards
    Sunil Sisodia

  • Migration V4 to V7 -- script logic problem

    Dear all,
    I am migrating all the necessary logics but in one logic I have following error
    "invalid dimension:AccountL"
    The accountL dimension is not a dimension in Version 7
    However in the logic is following syntax:
    *XDIM_MEMBERSET ACCOUNTDIM <> INVALID     
    *XDIM_MEMBERSET DATASRC<>INPUT     
    *XDIM_MEMBERSET INTCODIM <> INVALID     
    *XDIM_MEMBERSET ACCOUNTDIM <> INVALID     
    *XDIM_MEMBERSET DATASRC<>INPUT     
    *XDIM_MEMBERSET INTCODIM <> INVALID
    So I think it's something in the system constants file?
    But I dont know where to look...
    Someone has a solution?
    Thx
    Br
    Benjamin

    Hi Benjamin,
    you are right, it seems that the Dimension Mapping in SystemConstant.lgl file is not correct.
    You can find this file on the Appserver at %InstallDrive%BPCDataWEBFOLDERS%AppSet%ADMINAPP%Application%SystemConstant.lgl.
    Another possibility is to directly use the name of the Account dimension in Scriptlogic and not the alias "AccountDim"
    Regards
    Jörg

  • Script logic problem

    Hi ,
    I transfering the data from HR to finance .
    HR account dimension :  HRM_Account
    Finance account dimension : Account
    in HR diemnsion , i created one property ( fixgroup ) and value for required accounts is "transfer"
    at the same time in account dimension ( account ) in finance application all HR accounts under property ( group ) with value "HR"
    i exceuted below code ..but system unable read and write  my accounts from HR application .
    Pls look at my nbelow code and correct where i am wrong .
    *DESTINATION_APP=FINANCE
    *SKIP_DIM=HR_POSITION
    *SKIP_DIM=HR_VALUE
    *SKIP_DIM=HR_WTYPE
    *RENAME_DIM DATASRCOTH = DATASRC
    *RENAME_DIM HRM_CATEGORY = CATEGORY
    *RENAME_DIM HRM_ACCOUNT = ACCOUNT
    *SELECT (%ACCTSET%,"[ID]", "HRM_ACCOUNT", "[FIXGROUP] = ' HR ' ")
    *XDIM_MEMBERSET HRM_ACCOUNT = %ACCTSET%
    *XDIM_MEMBERSET DATASRCOTH = INPUT
    *XDIM_MEMBERSET COSTCTR = <ALL>
    *XDIM_MEMBERSET HR_POSITION = D_DUMMY
    *XDIM_MEMBERSET HR_VALUE = HRVAL
    *WHEN *
    *IS *
    *REC(FACTOR=1)
    *ENDWHEN
    Regards,
    PSR
    *COMMIT

    Hi Shoba ,
    I pasted ur code and after running it reading 636 records and skipped all records .
    Actuall in i need ready only 10 accounts under fixgroup property .
    but it reading 636 records ...means it is reading all reacords .
    pls let me know ur inputs .
    Regards,
    PSR
    Edited by: PSR on Jul 15, 2010 9:09 AM

  • Logical column - Fact measure using Dimension value

    Hello all, I have a Fact table that has a metric (Value) where I have set the Aggregation rule to Sum. Now I'd like to create a metric based on the value of a Product Dimension that joins to this Fact table. So I create logical column that has the syntax - Case When Product_Desc = 'A' then Value else 0 End.
    The issue is in Answers when I bring this new metric in it doesn't bring in the correct value, are there steps I am missing with creating this metric?
    My assumption is if I just bring that new metric in by itself it would return one record - A sum of the Value where the Product = 'A'.
    Thank you

    Hi BRizzle,
    In your scenario, you creatre a calculated measure using the employee dimension, and then this measure show "#VALUE" on the pivot table, right? It seems that it's a limitation of using calculated measures in SQL Server Analysis. Calculated measures cannot
    be secured using Dimension Security in a straight forward manner, in fact they won't be listed at all in the Dimension tab of the role where we define the Dimension security. When such measures are browsed in client tools like Excel, the value that would be
    displayed is an error value like #VALUE. For the detail information about it, please see:
    Limitations / Disadvantages of using Calculated Measures / Calculated Members in SSAS
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • How to create new record with old values

    Dear all
    i have creation page with 45 fields are there
    user will enter all the fields and save it will call to non editable mode
    if user will click on change button it will call to editable mode
    in that my requirement is user wont change among those ites(45 items)clcik on save again it will call to view mode
    in that user will change any one of the value among 45 items and click on save button i need to create one more record in database
    if user wont edit any one of the field out of 45 items i dont want to create new record in database
    how can we achieve thsi functionality
    Regards
    Sreekanth

    Hi Srikant,
    When user may edit the record, the same row may get updated in vo. Thus over writing existing row instead of creating new row.
    Approach1..
    On the page where user may edit records, instead of presenting records of existing row, present copy of existing row. So
    In AM... (Later on you can put vo logic to its proper place, i.e. vo java file)
    public void viewPageCallSetup()
    Row originalRow=vo.createRow();
    Row dummyRowForEdit=vo.createRow();
    //COPY THE ORIGINAL ROW TO DUMMY ROW. IF THERE IS DIRECT METHOD TO CREATE COPY OF EXISTING ROW, THAT MAY BE MUCH BETTER.
    for(int i=0;i<vo.getAttributeCount()-1; i++)
    dummyRowForEdit.setAttribute(i, originalRow.getAttribute(i));
    vo.insertRow(dummyRowForEdit);
    vo.setNewRowState(Row.STATUS_INITIALIZED);
    vo.setCurrentRow(dummyRowForEdit);
    call this method in contoller's processRequest..
    string oid=pagecontext.getparameter("oid");
    if(pageContext.getparameter("Purpose").equals("Edit")) //Means user clickED the edit button so we need to replicate the row
    am. viewPageCallSetup(oid); //calling this method in am
    else
    In PFR...
    if(pageContext.getparameter("Purpose").equals("Edit"))
    am.xxcostedit(oid); //calling this method in am
    in case user selects "Cancel" on edit form,we need to remove the duplicate row. So in AM write a method to remove the duplicate rowd on click of "Cancel" button on edit form.
    Rest of the logic is same for "Save" button. Just say commit.
    Abdul Wahid

  • Folder level script? How can I use field value as a pdf filename in save as dialog box

    I read somewhere that if you use a folder level script, you can do things like save a pdf with a specific filename - possibly based on a field name.
    How would one set up a folder level script?
    How do you execute a script from the PDF?
    What code would you use to change the PDF name to the contents of the fFieldName text field?
    Or, is this really just impossible to do?

    The article is interesting.  It suggests you place code like this:
    // Page Replacement Function
    var ReplaceLastPage = app.trustedFunction( function(cPath) {
    app.beginPriv();
    this.replacePages(this.numPages-1, cPath); app.endPriv();
    In the trusted folder.  What is the path of the trusted function(s) that get automatically loaded into Acrobat?
    I assume in the example above, function(cPath) is a function inside of the PDF...

  • EDI - ECC 6.0 DOCREL value.  Old value 46C, what's new value for ECC 6.0?

    Good morning all.  We are upgrading from 4.6C to ECC 6.0.  When  testing the inbound idocs for Purchase Orders, I am getting en  error on the DOCREL field.  It says that the value 46C is  invalid.  My question is: what is the valid value for the ECC  6.0 version of R/3?  Are there different values for different message types?  Thank you in advance!

    Hi,
    > 1 : How much space i exactly need for the same.As per document i will need 50 GB extra for DB and Some file system space for Downloading S/W and some temporary space.But as per discussion with some of my friends who did EHP5 upgrade it took approx 350 GB extra space, Also as per document in CHECKS Phase i will get the message for the sapce requirement but for the Presentation purpose i need to provide these detail to Client.Can you give your opinion.
    >
    > (Our Databse size is around 1TB )
    >
    Space required will be around 50-80 GB only. Initially you will need more space because it will ask you to create some new containers. But after upgrade you can delete old containers that will be empty and can release some space. Same has been there in post-installation steps of EHP5 upgrade guide.
    >
    > 2 : I want to know what will  be the impact on other systems like EP and PI, After activation of new functionalities how they will be reflected on the Portal or i need to upgrade my EP system as well ?????
    > Similarly what steps i need to perform for BI and PI systems.
    >
    You can check SAP note 1388258 for the same.
    Thanks
    Sunny

  • Can I download to new PC using old serial # after uninstalling Lightroom from old PC?

    I originally loaded Lightroom on my old PC using CD installation. New PC does not have CD slot.

    You can download the Lightroom 4 trial version to your new computer and use it for 30 days without a serial number.
    If you have a LR4 serial, or purchase it within 30 days, then you can enter the serial number in to the trial version and make it a full version.
    You cannot use a LR3 or earlier version serial number on a LR4 trial though. You'd have to purchase a LR4 upgrade, get a LR4 serial then enter your LR4 and LR3 serial number into the LR4 trial.

  • New iPhone using old Apple ID

    I'm that person who put my iPhone through the washing machine. Heavy load, long cycle. It's safe to say it's dead!
    Now I'm waiting for my new iPhone to arrive. I don't plan to restore from a back up because I don't have one recent enough to matter but will I be able to use my old Apple ID with this new iPhone? I guess my question is will it work without being deleted or erased off the old iPhone? Will it clash saying that it's still on another iPhone? Or will I need a new Apple ID altogether? TIA!

    Use a computer to go to http://www.icloud.com
    Sign in using your Apple ID.  Go to Find My iPhone.  Remove the destroyed iPhone from there.  Then you'll be all set and can use your old Apple ID.

  • Problem in Update using last value of a duplicate row

    Hi,
    I have 2 values in a table TEST
    10 ABC
    10 DEF
    I want to get the last value i.e 10 DEF
    I want the last value i.e 10 DEF to update in the table TEST1 which has value 10 XYZ.I want to update with 10 DEF
    I have tried using :
    with t
    as
    select 10 no, 'ABC' val from dual
    union all
    select 10 no, 'DEF' val from dual
    select no, val
    from (
    select no, val, row_number() over(order by val) rno, count(*) over() cnt
    from t)
    where rno = cnt
    But i got the last row of the duplicate values but how to update the last value into TEST1
    Any help will be needful for me.

    Just update it
    update test1 t
       set val = (select val
                    from (select no, val, row_number() over(order by val) rno, count(*) over() cnt
                            from test) t1
                   where rno = cnt
                     and t.no = t1.no)
    where exists(select null
                    from (select no, val, row_number() over(order by val) rno, count(*) over() cnt
                            from test) t1
                   where rno = cnt
                     and t.no = t1.no)

  • Having problems reading checkbox using $(item).value

    Is this the correct way to get the value of a checkbox using javascript
    var rem = 'P525_REMOVE_TEST';
    var isRem = $x(rem).value;
    alert(isRem);
    The checkbox return value is 'YES'
    I am getting undefined. What am I doing wrong?
    Howard

    Hi,
    Check box will return data only if it is checked otherwise it will return null.
    Put this code in "HTML Form Element Attributes" of your check box
    onchange="if (this.checked ) { alert(this.value);} else {alert('not checked')};"Regards,
    Manish

Maybe you are looking for

  • Why can't I do cumulative edits, like in iPhoto 6?

    I've just bought a new iMac (Core i5) running the latest iPhoto (9). It has some useful improvements over iPhoto 6 which was the previous version I used, but one thing has gone - I can't do cumulative edits any more. In v6, I could sharpen a soft pic

  • Question About Backing Systems Up

    Hi All, We are running several workstations with 10.3.9 on a Windows 2003 server network, and I am curious to know if there is any way to back up each system to the Win 2003 server so that we can recover if there ever are any problems? We are using R

  • Safari crashes as soon as I touch address bar

    I am so aggravated right now. I have 3rd gen iPad. As soon as I got it out of the box and configured it, Safari crashes. It was all factory settings and no other apps were installed. So I contact support and they do an exchange. I got the new one tod

  • Header in Viewer

    Hi, I created a crosstab in viewer with say "Category" in the top and "Collection" in left. I cant see these headers for the axes, I mean I can see the different values of Collection (A1, A2...) and Category(C1, c2,...), but the axis header/title ("C

  • Maintaining session among Web Applications

    Hi! I would like to know if there is a good solution for this purpose: maintain the session in three, four or more web applications. We know that if a user navigates through the pages that belong to only one of the web apps, the session can possibly