Script Logic returns inconsistent results

Hi Gurus,
I have a script which is supposed to populate an account with the sum of 2 other accounts, the relevant line I have is:
*REC(EXPRESSION=GET(ACCOUNT="NettClaimPaid")+GET(ACCOUNT="NettAmtOutstanding"),ACCOUNT="PPCA_Nett")
Now, if either Acc1 or Acc2, BUT NOT BOTH have an amount, the target account gets populated correctly.
However, when BOTH Acc1 and Acc2 have amounts, the resultant amount in the target account is:
(Acc1 + Acc2) * 2 ... i.e. exactly double the desired result.
The only other script I've been able to find on the forums that does an addition looks exactly like my one ...
What am I doing wrong?
Info:
SAP BPC 7.5 MS SP6 patch1 on SQL 2008 R2.

In get() try more giving  filters specific to each account  ,which differentiates the intersection . 
in the statement
*REC(EXPRESSION=GET(ACCOUNT="NettClaimPaid", xxxdim = " YYY")+GET(ACCOUNT="NettAmtOutstanding",xxxdim = " ZZZ"),ACCOUNT="PPCA_Nett")
If all other dimemsion members are same .Then it should work as expected .
If nothing works then try below code.
*when account
*is PPCA_Nett
*REC(EXPRESSION=0 ,ACCOUNT="PPCA_Nett")
*endwhen
*when account
*is PPCA_Nett
*REC(EXPRESSION=GET(ACCOUNT="NettClaimPaid")+%value% ,ACCOUNT="PPCA_Nett")
*endwhen
*when account
*is PPCA_Nett
*REC(EXPRESSION=GET(ACCOUNT="NettAmtOutstanding")+%value% ,ACCOUNT="PPCA_Nett")
*endwhen

Similar Messages

  • Any by Any returns inconsistant results

    Hi All, hope someone can help.
    Our system is BPC 5.1 MS, running on SQL 2005.
    We have a strange issue where the standard Any by Any report provided with the installation is returning inconsistant results.
    What is happening is that when I create an Any by Any report, the results in the table do not list all the possible values (i.e. the line/column headers [members] are there, but an amount does not appear in the intersection). The totals at the bottom & right are correct, showing what is in the system.
    An evDRE report creating exactly the same layout will show all the values, so the problem is not in the system.
    Does anyone have any idea what could be causing this?
    Regards,
    Peter

    Hi Patrick,
    Thanks for that SAPNote.
    I think that the issue may be along these lines!
    The Any by Any is using an evEXP to create it's expansion, the evEXP is referring to an MDX expression.
    The problem comes in when looking at the MDX expression ...
    1.) The SAPNote is referring to NESTED expansions ... this is not the case in the Any-by-Any
    2.) The SAPNote is referring to Dimensions with multiple hierarchies ... but the Any-by-Any gives the same issue even if I choose 2 dimensions that both only have a single hierarchy.
    The reason I think we may be on the right track, is that the lines that are missing are exactly the ones that would be expludes by "<>0" ... The problem is that the evEXP is only testing the TOP member chosen, & therefore misses out the ones where there may be values at a lower level, but they nett off.
    The SAPNote says that:
    "("&$I$24&".Currentmember,["&J25&"])<>0"
    Should change to ...
    "(["&$I$24&".H1].Currentmember,["&J25&"])<>0"
    The Any-by-Any I have has:
    "(["&$G$13&"],["&$E$17&"])<>0"
    I have tried the following:
    1.) Added in .CurrentMember ...
    a.)
    "(["&$G$13&"].CurrentMember,["&$E$17&"])<>0"
    b.)
    "(["&$G$13&".H1].CurrentMember,["&$E$17&"])<>0"
    2.) Removed the square brackets ...
          a.)
    "("&$G$13&",["&$E$17&"])<>0"
          b.)
    "("&$G$13&","&$E$17&")<>0"
          c.)
    "(["&$G$13&"],"&$E$17&")<>0"
    None of the options above work
    Any ideas?
    PS ... I see my greater than / less than operators are missing just before the zeroes ... they are there, I just can't get them to show on the HTML

  • Date string returns inconsistent results

    I use the function Format Date/Time String with the format argument "%d%b%Y_%H-%M-%S" to get a string which looks like "01Oct2004_11-01-45". The built application returns the same, however when the application is run on a PC in South Korea the string "01102004_11-01-45" is returned. What is wrong?

    Hello leifk,
    it seems they don't have an abbreviated month name :-)
    I think, it depends on the operating system and the country settings. Perhaps Labview can not work with the South Korean font (or unicode or whatever) and replaces the month name by the number...
    Btw. I would use "%Y%m%d" to have a alphabetical / numerical sorting order.
    Best regards
    GerdW
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Photo:getDevelopSettings() returning inconsistent results for new fields

    If you're using photo:getDevelopSettings(), see this report of an annoying bug with "new" develop fields such as "Contrast 2012" and "Blacks 2012":
    http://feedback.photoshop.com/photoshop_family/topics/sdk_photo_getdevelopsettings_returni ng_inconsistent_results_for_new_fields?rfm=1

    After several more iterations of testing, I discovered the problem is actually due to using the trinidad rendering kit. Part of my migration to 1.2 involved experimenting with the use of the trinidad components. I thought I had removed all the trinidad stuff from my application during testing of this date problem, but I discovered that I had left the following in:
    web-app library:    trinidad-1.2.10
    faces-config.xml entry:
        <default-render-kit-id>
                org.apache.myfaces.trinidad.core
        </default-render-kit-id>once these items were removed, the application worked as expected. So it looks like the problem is with the trinidad rendering kit/library.
    Edited by: emprice26 on Aug 11, 2009 6:02 PM

  • Query returning inconsistent result at each execution

    Hi All,
    Does any 1 have an idea?.I have 2 tables with more than 60 lac records.In a query i have to inner join the 2 tables and there is a where clause.
    select dsp.col2, s.col3
    from table1 dsp inner join table2 s
    on dsp.col1=s.col1
    where dsp.col2='30-Jan-2009'
    The query output used to work earlier but nowadays it seems the where clause is not working.The o/p is varied resultset.

    What is your Oracle version?
    It is working - (Off course in a small environment i've tested it. ;) )
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>ed
    Wrote file afiedt.buf
      1  select e.ename, d.loc
      2     from emp e inner join dept d
      3     on ( e.deptno = d.deptno)
      4* where e.hiredate < sysdate
    satyaki>/
    ENAME      LOC
    WARD
    MARTIN
    SCOTT      NY
    KING       KOLKATA
    TURNER
    ADAMS      NY
    JAMES
    FORD       NY
    MILLER     KOLKATA
    Smith      KOLKATA
    Glen       KOLKATA
    11 rows selected.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>Regards.
    Satyaki De.

  • cm:search is not returning any result when logical operator '!' is used.

    <cm:search is not returning any result when logical operator '!' is used.
    I am using BEA 9.1 content management services API. When I run the following query I am not receiving any results. Also no error or exceptions are seen in the weblogic or cmspi log.
    The query is <cm:search id="docs" query="!(object_name like 'Sport*')" />

    HI cam 
    Thanks for your reply, but i found the problem it was because my server administrator password has changed by network guys... and because of it crawler unable to access the content 
    I wrote my solution here i hope it will help other people 
    http://bvs-sharepoint.blogspot.com/2015/03/sharepoint-search-is-not-returning.html
    RB

  • Script Logic wrong results in migration to BPC 7.5M

    Hi Experts,
    We have an issue with Script Logic calculation after migration of BPC 7.0M to BPC 7.5M. At the beginning we thought that was the issue mentioned in SAP note 1515973, because we had SP03.
    Now we have SP07 and the problems persist. The result of a simply product between two numbers is wrong. For example in the next Default Script Logic:
    *WHEN TIME.GROUP
       *IS INPUT
    *WHEN CATEGORY
         *IS  <> "ACTUAL","B_ACTUAL"
              *WHEN ACCOUNTP             
                    *IS "M_SALES"
                        *REC(FACTOR=GET(ACCOUNTP="PRCT_SALES_BASIC"),ACCOUNTP="700200")
                        *REC(FACTOR=GET(ACCOUNTP="PRCT_SALES_PROMO"),ACCOUNTP="700230")
                        *REC(FACTOR=GET(ACCOUNTP="PRCT_SALES_LIMITED"),ACCOUNTP="700235")             
              *ENDWHEN
      *ENDWHEN
    *ENDWHEN
    *COMMIT
    Input:      M_SALES =           -195,75933
    Input:      PRCT_SALES_BASIC =      1
    Result: 700200 =           -195
    Are there some application parameter that defins de presicion of logic calculations?
    Some ideas? Thanks in advance.
    Best Regards
    Albert

    Hi Jörg,
    We changed to a new server with a multi-server architecture 64 bit (BPC Server and DB Server).
    Did you have the same problem? How do you resolve it?
    Thanks in advance.
    Best regards,
    Albert

  • BPC Script Logic - XDIM_FILTER results in error

    I am writing a Script Logic in BPC and I need it to include all records where the DESTINATION dimension member has the Dimension Property of PLANDEST = "Y"
    This approach works:
    *SELECT(%DestinationMbrs%,"[ID]","Destination","[PlanDest] = 'Y'")
    *XDIM_MEMBERSET DESTINATION = %DestinationMbrs%
    This approach does not work:
    *XDIM_MEMBERSET DESTINATION = <ALL>
    *XDIM_FILTER DESTINATION=[DESTINATION].PROPERTIES("PlanDest")="Y"
    It results in the error message at runtime:
    Error in step 1 of QueryCubeAndDebug: -2147467259 Query (1,156) The PLANDEST dimension attribute was not found.
    The reason I would like to use the second approach is that the first approach relies on the SELECT statement.  The documentation on the SELECT statement says:
    The *SELECT statement is executed at the time the logic is validated, and the expanded result is
    written in the LGX file. This means that if the related dimension is modified, it may be necessary
    to re-validate the rules.
    So if I change the DESTINATION dimension members PLANDEST flags, I need to re-validate the script logic.  That is a maintenance nightmare and a problem waiting to happen.
    How do I solve this so that the dimension attribute is evaluated at runtime, not at logic validation time?

    As Yuan Said, if you are using MDX logic and want to use property, you should check Inapp at the 'manage property' menu of admin console.
    Usually, InApp sholud not be selected for better performance of MDX query. (SAP recommendation)
    But. Here are two cases that you should select.
    1. MDX logic in the logic script.
    2. Dimension formula.
    I hope it will make clear for all.
    James Lim

  • Scripts run too fast? Inconsistent Results

    In Automator I wrote a simple workflow combining Applescript and Automator. I saved it as an application and it appears to work every time.
    In a new Automator workflow, I then tried looping the application 5 times. This yields inconsistent results though. It seems to loop, but steps are often missed in the workflow. Furthermore, which steps are missed is not consistent.
    The workflow includes importing sound files etc. which takes a bit of time, so I tried adding some delays here and there. I also tried quitting other app's to ensure it can run at a full speed. No luck though.
    Surely there is a more efficient and robust solution than guessing where to put delays and how long they should be?
    Any ideas?
    Thank you soooo much!

    My solution. STOP USING AUTOMATOR! Especially any mouse click tracking with the record button.
    Applescript is so much more versatile and reliable. I spent about 10 hours learning it from scratch to make this simple script, and I still suck at it, but it's been really worth it for me. It's really pretty simple.

  • Confusing results from script logic

    hi,
      i have the following script logics :
    *lookup finance
    *dim valuesales:account="sales"
    *dim valuecost:account="cost"
    *endlookup
    *when lookup(valuesales)
    *is>=lookup(valuecost)
      *rec(factor=0,account="validation")
    *else
      *rec(account="validation")
    *endwhen
      however the results are completely opposite of what i expected. when i did a evsen of 20 to "sales" and 10 to "cost", the result is 30 in "validation"; and when i did a evsen of 10 to "sales" and 20 to "cost", the result is zero in "validation".
      any idea?
    cheers

    All the SQL logic is referencing the data as it's stored in the fact tables (signeddata).
    Check your acctype. If the signed value of the sales (INC) is negative, and the cost (EXP) is positive, it may explain this.

  • Referring to SQL comment table in Script Logic

    Dear all,
      If i have the following combination of dimensions, i.e. "DimA, DimB and DimC", and they will point to a comment in the comment table in SQL, how do i grab the [Comment] from the comment table to be used in my script logic.
      I was adviced to use *select statement, but i can't seem to get it to work.
      Any help is much appreciated.
    Cheers,
    Lip Chean

    Hi,
    *Select allows you to retrieve a list of elements from a dimension or table and save it in a user-defined variable for later use anywhere else in the logic.
    For example, with this instruction:
    *SELECT(%REPORTING_CURRENCIES%, u201CIDu201D, u201CCURRENCYu201D, u201C[GROUP] = 'REP'u201D)
    In this case, you retrieve the ID of all members in the CURRENCY dimension where the property GROUP has the value REP. Running this example fills the variable %REPORTING_CURRENCIES% with the list of reporting currencies defined in the current application.
    Important information
    xxx The SELECT statement generates a SQL query, and NOT an MDX query. This implies that it can be executed against any SQL table existing in the application set database, and not just against the properties of a dimension in the cube. The prefix "mbr" is automatically added to any name entered in the table parameter. Otherwise, the name of the table is taken as is. If
    you want to select a list of elements from a dimension using an MDX query use *MEMBERSET statement.
    xxx In case any parameter contains embedded commas the entire parameter must be enclosed in an extra set of double quotes.
    xxx The *SELECT statement is executed at the time the logic is validated, and the expanded result is written in the LGX file. This means that if the related dimension is modified, it may be necessary to re-validate the logic.
    xxx Statements returning no members do not necessarily cause the validation of the logic to fail. In this case a warning is entered in the validation log.
    xxx These instructions are not specific to a given logic section, but they can be written once anywhere in the logic and used across multiple commit sections.
    Hope this helps.
    Badrish

  • Logical Error in Script Logic

    Hello Experts,
    Please provide your guidance for the following scenario.
    I need to calculate the 'Accumulated Depreciation' for every month, based on the amounts in the 'AccumDep' and the 'Depreciation' accounts.
    In other words, the value of the Accumulated Depreciation for the month of Feb should be equal to (Accumulated Depreciation in Jan + Depreciation in Jan), and so on.
    To accomplish this, I have written the following script logic.
    *WHEN ACCOUNT
    *IS AccumDep, Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(FACTOR=1, ACCOUNT=AccumDep, TIME=%MON%)
         *NEXT
    *ENDWHEN
    *COMMIT
    The above logic was validated without any 'syntax' errors.  However, I do not see the desired results, as the Accumulated Depreciation is not getting updated every month.  The amount from FEB appears for MAR & APR also.
    Therefore, could you please review the above script and let me know if there are any 'logical' errors?
    All your guidance is greatly appreciated.  Thanks...

    Hi,
    You are not getting the desired result because you are trying to aggregate the depreciation and the accumulated depreciation of the same month and post the result again in the same month. Lets say the code is working for 2009.MAR. You are trying to add the depreciation and accumulated depreciation of 2009.MAR. However, you still dont have the acc depreciation of 2009.MAR. You basically need to take the acc depreciation of the previous month.
    You can try something like:
    *WHEN ACCOUNT
    *IS Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(EXPRESSION = %VALUE% + ([ACCOUNT].[AccumDep],[TIME].Previous), ACCOUNT=AccumDep)
         *NEXT
    *ENDWHEN
    *COMMIT
    You can have a property called Previous to store the previous month of each period in the time dimension.
    Hope you got the idea.

  • How to use the current view in script logic - %DIMENSIONNAME_SET% not work

    Hello,
    I have the requirement to use the values from the current view in the script logic. User would like to use the members which were selected from the current view in the calculation.
    We are using SAP BPC 7.0 SP06
    I have prepared the following scrpit:
    *XDIM_MEMBERSET TIME=$YEARS001$.NA
    *XDIM_MEMBERSET ACCOUNT=BAS(PLVEH_EXP)
    *SELECT(%CBU%,ID,BUSINESSAREA,[ID]='%BUSINESSAREA_SET%'")
    *SELECT(%CIO%,ID,INTERNALORDER,[ID]='%INTERNALORDER_SET%'")
    *RUNALLOCATION
    *FACTOR=USING
    *DIM BUSINESSAREA WHAT=BANA;WHERE=%CBU%;USING=<<<
    *DIM INTERNALORDER WHAT=IONA;WHERE=%CIO%;USING=<<<
    *DIM INDICATORS WHAT=INVEHPRI;WHERE=INPXQ;USING=INVEHQUA
    *ENDALLOCATION
    I have read in the sdn that it is possible to get the current values using %DIMENSIONNAME_SET% variable and use it but it returns all the members that were selected in the datapackage.
    I would like to know if there is any special consideration regarging the use of variable or if there is another way to solve it.
    Thanks in advance.

    Hi,
    If you want the code to be executed for the current view selected, you can place the code in Default logic which executes the logic for what ever current view values you send the data through Input schedule.
    The key word you have mentined is for script running through Data Manager which gets the value selected through user promt.
    Hope this helps,
    Regards,
    G.Vijaya Kumar.

  • Lookup Script Logic

    Dear Freinds,
    I am trying to write script logic for learning LOOKUP fuction of script logic and written the below code in BPC 7.5 NW its not working. Please let me know my mistake .
    *XDIM_MEMBERSET TIME =2009.APR
    *XDIM_MEMBERSET P_ACCT=CE0004010
    *XDIM_MEMBERSET CATEGORY=ACTUAL
    *LOOKUP RATE
    *DIM TIME="2009.APR"
    *DIM CATEGORY="ACTUAL"
    *DIM R_ACCT="AVG"
    *DIM R_ENTITY="GLOBAL"
    *DIM RATEEUR:INPUTCURRENCY="INR"
    *DIM MEASURES="PERIODIC"
    *ENDLOOKUP
    *WHEN P_ACCT
    *IS "CE0004010"
    *REC(EXPRESSION=%VALUE%/LOOKUP(RATEEUR), RPTCURRENCY="INR")
    *ENDWHEN

    below is the UJTK log but I am not getting result. Please help me .
    LOG:
    FILE:\ROOT\WEBFOLDERS\BPC_Demo \ADMINAPP\MGT_CONSO\TEST.LGF
    USER:PARAGONDNS\BPC_CON
    APPSET:BPC_Demo
    APPLICATION:MGT_CONSO
    [INFO] GET_DIM_LIST(): I_APPL_ID="MGT_CONSO", #dimensions=8
    CATEGORY,MEASURES,P_ACCT,P_ACTIVITY,P_CC,P_DATASRC,RPTCURRENCY,TIME
    #dim_memberset=3
    TIME:2009.APR,1 in total.
    P_ACCT:CE0004010,1 in total.
    CATEGORY:ACTUAL,1 in total.
    REC :%VALUE%/LOOKUP(RATEEUR)
    CALCULATION BEGIN:
    QUERY PROCESSING DATA
    QUERY TIME : 1535.45 ms. 2  RECORDS QUERIED OUT.
    QUERY REFERENCE DATA
    QUERY LOOKUP DATA FROM APPLICATION: RATE
    QUERY TIME : 416.49 ms. 1  RECORDS QUERIED OUT.
    CALCULATION TIME IN TOTAL :123.38 ms.
    1  RECORDS ARE GENERATED.
    CALCULATION END.
    SCRIPT RUNNING TIME IN TOTAL:2.42 s.

  • *Prior statement in script logic

    Hi,
    I'm getting started with script logic and I'm trying to create a record that will be the result of the current amount in a specific account minus the amount for the same account in the previous period.
    I was thinking to use a "prior" statement, but not really sure how to do that. Do somebody could write me an example that would sbustract my current amount minus the amount from the previous period where the account is the same in a sql logic?
    Thanks
    Martin

    Hi,
    This should do the trick.
    *INCLUDE SYSTEM_CONSTANTS.LGL
    *XDIM_MEMBERSET TIMEDIM=PRIOR,%TIME_SET%
    *XDIM_Member DataSrc=INput
    *WHEN *
    *IS *
    *REC(EXPRESSION=GET(DATASRC="INPUTSAP",TIME=PRIOR)-GET(DATASRC="INPUTSAP"),NOADD,DATASRC="Movement")
    *ENDWHEN
    *commit
    Cheers,
    AvdB
    Edited by: Gert Andries van den Berg on Aug 12, 2009 9:14 AM

Maybe you are looking for

  • Sales Employees in Sales Order

    Hi All, I have created a customer in 3 different sales areas and assigned 3 different employees in each of the sales areas(Customer Master) . When I create a sales order with products from the three divisions I want the employee responsiblefor that p

  • Which Method Should be overriden to update a column in master?

    Hi, I have a Master/Detail relationship with the requirement to update master depending on some column in detail. This update of master can raise an exception and it should be done at post time. The way to update master changes depending on the DML a

  • APEX Theme 25 - Responsive Grid Layout Question

    Hi What is the best way to control an item to be positioned right next to the other item on the same row. I have a select list that I would like to have an edit button right next to it. I created two items for example: P_MY_SELECT_LIST Grid set New L

  • HTTP_RESP_STATUS_CODE_NOT_OK error casue RFC

    Hi all should i maintain a RFC connection between SAP PI and R/3 with connection type H, but i do have connection RFC for R/3 to SAP PI with connection type H and my Proxy to file is working fine , Thanking you 'Sridhar

  • Know what is in a upgrade (changelog)

    Hello, I would like to know what is exactly in an upgrade done by archlinux developpers. For example, if shotwell 11.1 is upgraded to shotwell 11.2 I can see what is new on shotwell website because it is a upgrade done by shotwell developers. However