Time total in script logic

hi,
  i am using bpc 7.0 MS sp 2
  i have a situation where i need to do a simple formula using only 2 dimensions, i.e. account and time.
  the formula goes like this:
(accountA, time monthA) - (accountB, aggregate of Jan till Dec of the year shared by time monthA) = (accountC, time monthA)
  what i have done is this:
*xdim_memberset account=A,B
*xdim_memberset time=%year%.jan,%year%.dec
*calc_each_period
*calc_dummy_org time=parenth1
*when account
*is "A"
*when time.year
*is "2010"
  *rec(expression=%value%-get(account="B",time.id="#2010.total"),account="C")
*endwhen
*endwhen
*commit
  i have entered the following test values:
accountA, 2010.mar - 3
accountB, 2010.jan - 1,
accountB, 2010.feb - 2,
accountB, 2010.mar - 3,
accountB, 2010.apr - 4,
  and the result i am expecting is 7 that corresponds to accountC, 2010.mar, however i am getting the value "3" in accountC, 2010.mar
  it's as if the aggregate is not getting aggregated, and it's just 3-0 = 3.
  any ideas?
cheers,
lip chean

Brother, did you have any luck trying to get this to work?
If so, can you share?
Best regards,
Leandro Brazil

Similar Messages

  • Lookup total value in logic script

    hi experts,
    is it possible to lookup with same criteria that returns many row and fetch the total of all returning rows ? if it is possible, how ?
    you can see at attached picture, i try to lookup with same criteria (row 3 & row 5), the different only at column 3. what i want is fetch the total value of row 3 & row 5 = 1000 + 10000 = 11000
    but what i get is 1000 which means only fetch the first row (row 3).
    the code that i using in my logic script:
    *XDIM_MEMBERSET ACCOUNT = 551010
    *XDIM_MEMBERSET METRIC = PERCENTAGE
    *XDIM_MEMBERSET RPTCURRENCY = LC
    *XDIM_MEMBERSET SUBITEM1 = NO_SUB1
    *XDIM_MEMBERSET MEASURES = PERIODIC
    *XDIM_MEMBERSET SUBITEM3 = NO_SUB3
    *XDIM_MEMBERSET BUAREA = NO_BUAREA
    *XDIM_MEMBERSET ENTITY = %ENTITY_SET%
    *XDIM_MEMBERSET CATEGORY = 2014Q3
    *XDIM_MEMBERSET AUDITTRAIL = Input, OFFSET
    *XDIM_MEMBERSET INTERCO <> NO_INTERCO
    *XDIM_MEMBERSET TIME = 2014.07
    *LOOKUP Finance
    *DIM EXP_Input:AUDITTRAIL = Input
    *DIM EXP_Input:METRIC = AMOUNT
    *ENDLOOKUP
    thank you.

    Hi Yoki,
    Please, read How To: Ask questions about Script Logic issues
    Point 9! and other...
    In general it's possible to use LOOKUP to get a value of the parent node, but it's not clear what total do you want to get.
    Vadim

  • Next, Prior Time in Script Logic

    Hi there,
    I have a problem about script logic. I have 2 monthly rate types. One of them is end-of-period rate(EPR) and other is average rate(AR). i want calculate average rate(AR) summing two consecutive end-of-period rate, dividing 2. But i donu2019t know how can i get previous end-of-period rate. I used prior and next(-1) but it does not work. Can you explain it how can i do this?
    Example;
    --Jan-Feb---Mar
    EPR -2-3----4      
    AR----22,5--3,5
    *WHEN KUR_ACCOUNT
    *IS EPR
    *WHEN TIME.MONTHNUM
    *IS 1
    *REC(KUR_ACCOUNT=AR)
    *ELSE
    *REC(EXPRESSION=(%VALUE% + GET(TIME=NEXT(-1)) / 2, KUR_ACCOUNT=AR)
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    Thanks in advance.

    What version and support package of BPC do you work on?  In BPC 7.5 a new time offset is possible with the keyword TMVL.
    Thanks and best regards,
    [Jeffrey Holdeman|http://wiki.sdn.sap.com/wiki/display/profile/Jeffrey+Holdeman]
    SAP Labs, LLC
    BusinessObjects Division
    Americas Applications Regional Implementation Group (RIG)

  • How to use total elements in a script logic?

    Hi All,
    I am using BPC 7.0 MS. I need to create a calculation using script logic as follows:
    The application name is GYP and it is composed by the following dimensions:
    PL (Account type) in this dimension are the units
    Time
    Category
    Entity
    Product
    RptCurrency
    I would like to make a calculation like this:
    UNITS of any product (base element) and any entity (base element) for the BUDGET category and LC currency divided by UNITS of TotalEntity.
    Also, I would like to check before the calculation if UNITS have any value to proceed with that calculation.
    Best Regards,
    Luisana

    Hi Robert,
    Thank you for your reply.
    Let me explain better what i would like to do. I have an application called GYP, it is composed for the following dimensions:
    PL (Account type)
    Time
    Category
    Entity
    Product
    RptCurrency
    In the PL dimension i have an element called UNITS and another one called UNITSBYX. I would like to get a calculation like this:
    For the BUDGET category and LC currency.
    UNITSBYX = UNITS for each ENTITY / UNITS for ALL_ENTITIES
    Let's say I have three entities:
    Units for Entity1 = 50
    Units for Entity2 = 100
    Units for Entity3 = 300
    Units for All_Entities = 450
    The calculation should be like this:
    UNITSBYX = Units for Entity1 / Units for All_Entities
    UNITSBYX = 50 / 450
    UNITSBYX = 0.11
    UNITSBYX = Units for Entity2 / Units for All_Entities
    UNITSBYX = 100 / 450
    UNITSBYX = 0.22
    I hope you get my point.
    Kind regards,
    Luisana

  • 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 taking a lot of time to execute

    Hi,
       I have a script logic which does the currency translation
    But it takes a lot of time to execute the same. can anyone suggest me to write a effective script logic to reduce the
    performance .
    I am using the input schedule that uses the script logic to execute with 6000 records.
    below is the script logic
    *LOOKUP RATE
       *DIM R_ACCT=[ACCOUNT].RATETYPE
       *DIM FX_LC1:R_CURRENCY ="LC1"
       *DIM FX_LC2:R_CURRENCY ="LC2"
       *DIM FX_LC3:R_CURRENCY ="LC3"
       *DIM FX_LC4:R_CURRENCY ="LC4"
       *DIM FX_LRC:R_CURRENCY ="LRC"
       *DIM R_ENTITY                     =GLOBAL
       *DIM SCENARIO                   =[SCENARIO]
       *DIM TIME                            =[TIME]
    *ENDLOOKUP
    *WHEN ACCOUNT.RATETYPE
    *IS "AVG","END"
       //TRANSLATE
       *WHEN CURRENCY
       *IS LC1
           *WHEN COMPANY.LC1
           *IS <> "NUL"
                *REC(FACTOR=LOOKUP(FX_LC1),CURRENCY=USD)
                *REC(FACTOR=LOOKUP(FX_LC1)/LOOKUP(FX_LRC),CURRENCY=LRC)
           *ENDWHEN
       *IS LC2
           *WHEN COMPANY.LC2
           *IS <> "NUL"
                *REC(FACTOR=LOOKUP(FX_LC2),CURRENCY=USD)
                *REC(FACTOR=LOOKUP(FX_LC2)/LOOKUP(FX_LRC),CURRENCY=LRC)
           *ENDWHEN
       *IS LC3
            *WHEN COMPANY.LC3
            *IS <> "NUL"
                *REC(FACTOR=LOOKUP(FX_LC3),CURRENCY=USD)
                *REC(FACTOR=LOOKUP(FX_LC3)/LOOKUP(FX_LRC),CURRENCY=LRC)
            *ENDWHEN
       *IS LC4
            *WHEN COMPANY.LC4
            *IS <> "NUL"
                 *REC(FACTOR=LOOKUP(FX_LC4),CURRENCY=USD)
                 *REC(FACTOR=LOOKUP(FX_LC4)/LOOKUP(FX_LRC),CURRENCY=LRC)
            *ENDWHEN
       *IS LC_USD
          *REC(FACTOR=1,CURRENCY=USD)
          *REC(FACTOR=1/LOOKUP(FX_LRC),CURRENCY=LRC)
       *ENDWHEN
    *ENDWHEN
    *COMMIT
    Kindly help as soon as possbile
    Edited by: Deepak_Hegde on Feb 2, 2012 4:58 PM

    Why wouldn't you use standard functionality with *RUN_PROGRAM CURR_CONVERSION?
    You'll have to call it multiple times since you want to translate into different currencies, but I think it will still be faster than this script.

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

  • Distribution in script logic

    Hello, all.
    I'm new in BPC. Please give advice, how can we realize following logic.
    We have a application Sales with following dimensions.
    Account, Category, DataSrc, Entity, Department, Prodline, RptCurrency, Time
    User send data to the DB in view:
    Account | Category | DataSrc | Entity | Department | Prodline | RptCurrency| Time
    NetSales | BUDGET | Input | Company_In | Sales | NoProd | LC | 2008.INP
    Where each record NetSales, Budget, etc has no child
    and user send data in view:
    Account | Category | DataSrc | Entity | Department | Prodline | RptCurrency| Time
    Coeficient | BUDGET | Input | Company | Sales | NoProd | LC | 2008.INP
    Where Entity has 3 childs: Company_1, Company_2, Company_3.
    After posting a data to Fact table, it view, is:
    Account | Category | DataSrc | Entity | Department | Prodline | RptCurrency| Time | Signed_data
    NetSales | BUDGET | Input | Company_In | Sales | NoProd | LC |2008.INP| -20
    Coeficient| BUDGET | Input | Company_1 | Sales | NoProd | LC | 2008.INP| -0,1
    Coeficient| BUDGET | Input | Company_2 | Sales | NoProd | LC | 2008.INP| -0,3
    Coeficient| BUDGET | Input | Company_3 | Sales | NoProd | LC | 2008.INP| -0,6
    I want to get new records in db such as:
    Account | Category | DataSrc | Entity | Department | Prodline | RptCurrency| Time | Signed_data
    NetSales | BUDGET | Input | Company_1 | Sales | NoProd | LC | 2008.INP| -2
    NetSales | BUDGET | Input | Company_2 | Sales | NoProd | LC | 2008.INP| -6
    NetSales | BUDGET | Input | Company_3 | Sales | NoProd | LC | 2008.INP| -12
    Where NetSales distribute by coefficient for each Entity.
    I want do something like (Account ="NetSales",Entity ="Company_1")= (Account="NetSales",Entity="Company_In")*(Account="Coeficient",Entity.Company_1) for each Company_n.
    How can I write script logic for this.
    Thanks

    I think there are several options.  The easiest option may be simply to construct a template that sends the values directly based on the input of the Coefficients and the Raw data value input of 20.  Thus the input process would submit 7 total entries.
    Now should you wish to have a repeatable calculation process that updates the Child entities each time either a coefficient or data input point is submit, then you could utilize script logic that was suggested in the thread as an allocation process. Otherwise, you would need to develop sets of properties and script logic for each set of requests such as:
    *When Account.ID
    *IS COEFFICIENT
    *WHEN ENTITY.ID
    *IS COMPANY_1
    *REC(EXPRESSION = VALUE * GET(ACCOUNT=ACCOUNT.NETSALES,ENTITY=ENTITY.COMPANY_IN), ACCOUNT=ACCOUNT.NETSALES)
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    This is not as flexible and there are many approaches that may be taken here, such as using LOOKUP statements and proeprties to manage the calculations and make them more flexible. It will just depend on how much volume there is to calculate, how many statements are required and how often the logic will need to be updated or managed based on hierarchy changes to the entity dimension.  Plus, you need to test many options to determine which is the fastest approach during the send process.
    Hope this helps.

  • 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 record more than 300,000 record

    Hi Expert,
    When I run my logic I have error in my formula log:
    (More than 300,000 records. Details are not being logged)
    Ignoring Status
    Posting ok
    I check my script it pull out total 422076 records.
    Is it meaning I cannot More than 300,000 records??
    Is there any where I can set MAX records I can generate for my single script to run??
    Thanks..

    You should use
    *XDIM_MAXMEMBERS dimension = numberOfMembers to be processed at a time
    For example
    *XDIM_MAXMEMBERS Entity = 50
    Figure out wich dimension has the most members, and use it, this sections you script logic.
    I hope that helps
    Leandro Brasil

  • 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

  • Script logic error - Invalid object name 'tblStatus'

    Hi all,
    Running BPC 5.1 SP5 on SQL 2005.
    Has anyone ever seen this error message before? I only get the error message when choosing the run-time option in the package, to honor work status settings. This problem just appeared in the last few days, and I believe that a month or two ago, users were running the same logic (with the same yes-honor-work-status option selected).
    We did recently upgrade from 5.1 SP3 to 5.1 SP5, and I'm wondering if this may be a cause? That's just a hypothesis though.
    Invalid object name 'tblStatus'. in:
    select distinct d.VERSION,d.ENTITY,d.TIMEID
    from #RESULT_333729 d  where signeddata<>0
    and exists (select * from tblStatus s where [APP]='CONSOL' and d.VERSION=s.CATEGORY and d.ENTITY=s.ENTITY and d.TIMEID=s.TIME and [STATUS]>0)
    I understand what it means, and of course there is no table in the appset database tblStatus. Work status locks are kept in tblConsolLock (where Consol is my app name). And in that table, the field name is StatusCode, not Status. So it appears that this is some vestige of code from an earlier version of BPC / O'soft.
    This error occurs in a piece of script logic, that includes both basic SQL WHEN/IS/*REC's and also a *RUNALLOCATION. The error is thrown within the RUNALLOCATION code block. The complete run-up to the error message is shown below.
    -- Calculate difference
    insert into #DIFF_333729 ([ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION],signeddata)
    select [ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION],amtWHERE as signeddata
    from #WHERE2_333729
    select [ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION],sum(signeddata) as signeddata
    into #RESULT_333729 from #DIFF_333729
    group by [ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION]
    --Time to calculate and count differences (45459 found):2.5 sec.
    select distinct d.VERSION,d.ENTITY,d.TIMEID
    from #RESULT_333729 d  where signeddata<>0
    and exists (select * from tblStatus s where [APP]='CONSOL' and d.VERSION=s.CATEGORY and d.ENTITY=s.ENTITY and d.TIMEID=s.TIME and [STATUS]>0)
    call 1 completed and data posted in 23.6 sec.
    Run completed in 23.7 sec.
    End time --->11:01:05 AM  -  Date:1/16/2009
    Invalid object name 'tblStatus'. in:
    select distinct d.VERSION,d.ENTITY,d.TIMEID
    from #RESULT_333729 d  where signeddata<>0
    and exists (select * from tblStatus s where [APP]='CONSOL' and d.VERSION=s.CATEGORY and d.ENTITY=s.ENTITY and d.TIMEID=s.TIME and [STATUS]>0)
    Here is the original script logic (from the LGX file -- the LGF file has a whole bunch of variables in it that would only confuse the matter more). It works just fine when the
    *RUN_ALLOCATION @A_1||
    USING/TOTAL|
    ACCOUNT WHAT=659210,659310,659320,659410,659510,659610,659620,659630,659710,659810,659820,659910; WHERE=<<<; USING=PCAYTD510000; TOTAL=<<<|
    PRODHIER WHAT=PRODHIERL1A;WHERE=[PRODHIERLEVEL]='5'; USING=<<<; TOTAL=<<<|
    DATASRC WHAT=PCAASSESSSTAGE1,PCAASSESSSTAGE2; WHERE=PCAASSESSALLOC1; USING=INPUTCONSOL; TOTAL=<<<|
    ENTITY WHAT=[COMPANYCODE]='7470' AND [PCAASSESSDRIVERBP]='PCAYTD510000' AND
      ([PCAASSESSMETHODBP] = 'ALLOCAUTO' OR  [PCAASSESSMETHODBP] = 'ALLOCMANUAL');WHERE=<<<;USING=7470.BASE;TOTAL=<<<|
    Anyone experience this same error message? I searched for SAP support notes and found nothing to do with tblStatus or similar.
    Thanks for your help,
    Tim

    Hi Sorin,
    Thanks, you've confirmed what I suspected.
    Yes, we always process & save apps & dims on any upgrade.
    We've reproduced the problem in all 3 of the environments with the customer's appset. I haven't yet reproduced in ApShell, but will do so & report it as a bug.
    And just out of curiousity -- was the other message you saw here in this EPM forum? Before I posted my question, I searched both here, and in the support notes, for "tblStatus" and a few other terms about work status lock errors, etc., and came up with 0 results.
    Thanks again,
    Tim

  • Regarding RunAllocation Script logic.......................................

    Hi SAP BPC Guys,
                        How to  write code for plan data using Previous data using "runallocation" Script logic?
                       i am also wrote code  for one month. but i don't know how write 12 months?
    //FOLLOWING ADDED TO FIND MONTHS ALREADY PAST
    *SELECT(%MONTHS_GONE%, ID, Time, INPUT=2009.Y)
    *SELECT(%MONTHS_TO_ALLOCATE%, ID, Time, INPUT=2009.Y)
    //*XDIM_MEMBERSET TIME=2009.JAN,2010.JAN
    *XDIM_MEMBERSET A_ACCOUNT=BAS(OperatingExpense)
    *XDIM_MEMBERSET CATEGORY=ACTUAL,PLAN
    *XDIM_MEMBERSET ENTITY=ASA,BAS(RASA)
    //FOLLOWING TO REDUCE INPUT AMOUNT, BY PAST MONTH AMTS
    *XDIM_MEMBERSET Time=2010.INPUT
    *FOR %MT%=%MONTHS_GONE%
    OperatingExpense=OperatingExpense-(OperatingExpense,Time.%MT%)
    *NEXT
    *COMMIT
    //Create total operating Expenses to be allocated.
    *WHEN ENTITY
    *IS "ASA"
    *REC (EXPRESSION=50000,TIME=2010.JAN,CATEGORY=PLAN)
    *ENDWHEN
    *COMMIT
    //Allocate to base countries.
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM A_ACCOUNT WHAT=BAS(OperatingExpense); WHERE=<<<; USING=<<<; TOTAL=<<<
    *DIM ENTITY WHAT=ASA; WHERE=BAS(RASA); USING=<<<; TOTAL=<<<
    //*DIM TIME WHAT=>>>; WHERE=2010.JAN; USING=2009.JAN; TOTAL=<<<
    //CHANGED ???? TO 2010.INPUT
    *DIM TIME WHAT=2010.INPUT; WHERE=%MONTHS_TO_ALLOCATE%; USING=2009.JAN; TOTAL=<<<
    *DIM CATEGORY WHAT=>>>; WHERE=PLAN; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    //Clear the total operating Expenses account
    *WHEN ENTITY
    *IS "ASA"
    *REC (EXPRESSION=0,TIME=2010.JAN,CATEGORY=PLAN)
    *ENDWHEN
    Can u  replay me.
    Thanks.
    Edited by: devi on Oct 5, 2010 10:46 AM

    I can  validate DM Package
    Then i got this Error Msg
    /CPMB/MODIFY : Completed in 0 seconds
    /CPMB/ALLOCATION_LOGIC : Completed in 0 seconds
    /CPMB/CLEAR : Completed in 0 seconds
    [Selection]
    ASARENT=200000
    SOURCE=ASA
    TARGET=RASA
    $SRC_TIME$=2009.INP
    $DST_TIME$=2009.TOTAL
    (Member Selection)
    CATEGORY: ACTUAL,PLAN
    RPTCURRENCY: LC
    TIME: 2008.TOTAL,2009.TOTAL
    [Messages]
    RUN_LOGIC:Member "%DST_TIME%" not exist
    Failed
    Application : PLANNING. Package status: ERROR
    My data manager script is:
    PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")
    PROMPT(TEXT,%ASARENT%,"How much do you want to allocate?",)
    PROMPT(TEXT,%SOURCE%,"Enter Source Entity",)
    PROMPT(TEXT,%TARGET%,"Enter Target Entities",)
    PROMPT(TEXT,%$SRC_TIME$%,"Enter source .INP time period (i.e. 2009.INP)",)
    PROMPT(TEXT,%$DST_TIME$%,"Enter destination .TOTAL time period (i.e. 2009.TOTAL)",)
    INFO(%EQU%,=)
    INFO(%TAB%,;)
    TASK(/CPMB/ALLOCATION_LOGIC,TAB,%TAB%)
    TASK(/CPMB/ALLOCATION_LOGIC,EQU,%EQU%)
    TASK(/CPMB/ALLOCATION_LOGIC,SUSER,%USER%)
    TASK(/CPMB/ALLOCATION_LOGIC,SAPPSET,%APPSET%)
    TASK(/CPMB/ALLOCATION_LOGIC,SAPP,%APP%)
    TASK(/CPMB/ALLOCATION_LOGIC,SELECTION,%SELECTION%)
    TASK(/CPMB/ALLOCATION_LOGIC,LOGICFILENAME,ALLOCATEHISTORICAL.LGF)
    TASK(/CPMB/ALLOCATION_LOGIC,REPLACEPARAM,ASARENT%EQU%%ASARENT%%TAB%SOURCE%EQU%%SOURCE%%TAB%TARGET%EQU%%TARGET%%TAB%SRC_TIME%EQU%%SRC_TIME%%TAB%DST_TIME%EQU%%DST_TIME%%TAB%)
    My script logic:
    *XDIM_MEMBERSET TIME=2008.TOTAL,$SRC_TIME$,$DST_TIME$
    *XDIM_MEMBERSET P_ACCT=RENT
    *XDIM_MEMBERSET CATEGORY=PLAN,ACTUAL
    *XDIM_MEMBERSET ENTITY=$SOURCE$,$TARGET$
    *WHEN ENTITY
    *IS "ASA"
    *REC (EXPRESSION=$ASARENT$,TIME=2009.TOTAL,CATEGORY=PLAN)
    *ENDWHEN
    *COMMIT
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM P_ACCT WHAT=RENT; WHERE=<<<; USING=<<<; TOTAL=<<<
    *DIM ENTITY WHAT=$SOURCE$; WHERE=BAS($TARGET$); USING=<<<; TOTAL=<<<
    //*DIM TIME WHAT=>>>; WHERE=2009.JAN; USING=2008.JAN; TOTAL=<<<
    *DIM TIME WHAT=$SRC_TIME$; WHERE=BAS($DST_TIME$); USING=BAS(2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=>>>; WHERE=PLAN; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    *WHEN ENTITY
    *IS "ASA"
    *REC (EXPRESSION=0,TIME=2009.TOTAL,CATEGORY=PLAN)
    *ENDWHEN

  • Incorrect value with Script Logic

    Hello,
    From initial value called 2008.ORC we want to calculate for each month the percentage , from child DIASMES.
    Now, with the script logic ( I´ll put down later) we have an incorrect value in the column 2008.TOTAL.
    In other words, I´m sure I´m wrong with "WHAT" or "WHERE sentence or maybe the operation "FACTOR=USING/TOTAL" fails because the crossing between dimensions it´s incorrect.
    *RUNALLOCATION
    *FACTOR = USING/TOTAL
    *DIM FABRICA_MAQ WHAT=BAS(FABRICAFF); WHERE=BAS(FABRICAFF); USING=BAS(FABRICAFF);
    *DIM PRODUTOS WHAT=BAS(TOTALPROD); WHERE=BAS(TOTALPROD); USING=SP;
    *DIM TIME WHAT=2008.ORC;WHERE=BAS(2008.TOTAL); USING=BAS(2008.TOTAL);
    *DIM TIPO WHAT=BAS(TOT); WHERE=BAS(TOT); USING=ST;
    *DIM VARIAVEIS WHAT=MIXACABADA; WHERE=MIXACABADA; USING=DIASMES;
    *DIM DATASRC WHAT=INPUT; WHERE=INPUT; USING=INPUT;
    *DIM VERSAO WHAT=BUDGET; WHERE=BUDGET; USING=BUDGET;
    *ENDALLOCATION
    *COMMIT
    The Key is to see in the column 2008.TOTAL ( when we selected  "BAS") the value of parent divided into "DIASMES" !
    Thanks !! 

    Your factor statment references a TOTAL, but you don't reference the total in your DIM statements. If you look at the debug log carefully, you should notice that there's no calculation of a TOTAL value.
    Try something like this. The only reason I move some dimensions from the *RUNALLOCATION up to the *XDIM's is for legibility, since the allocation makes no shifts to these dimensions. The logic should produce the same results, either way.
    // These dimensions have no shift of data.
    *XDIM_MEMBER VERSAO=BUDGET
    *XDIM_MEMBER DATASRC=INPUT
    // I'm assuming here that FACRICAFF is the top member of this dimension.
    *XDIM_MEMBERSET FABRICA_MAQ = <ALL>
    *RUNALLOCATION
    *FACTOR = USING/TOTAL
    *DIM PRODUTOS WHAT=BAS(TOTALPROD); WHERE=BAS(TOTALPROD); USING=SP; TOTAL=<<<
    *DIM TIME WHAT=2008.ORC;WHERE=BAS(2008.TOTAL); USING=BAS(2008.TOTAL); TOTAL=<<<
    *DIM TIPO WHAT=BAS(TOT); WHERE=BAS(TOT); USING=ST; TOTAL=<<<
    *DIM VARIAVEIS WHAT=MIXACABADA; WHERE=MIXACABADA; USING=DIASMES;  TOTAL=<<<
    *ENDALLOCATION
    *COMMIT

  • Script Logic interpreted

    Hi there, I need help. I really am studying script logic but it's hard for me to interpret them...
    Could someone help me to do it? The title of the logic anyway is "top down allocation."
    What does this logic all about? I mean, explain it please...
    *SELECT(%TOPDALLOC%,"[ID]", "ACCOUNT", "[TOPDALLOC] = 'Y'")
    *XDIM_MEMBERSET ACCOUNT = %TOPDALLOC%
    *FOR %TDALLOC%=%TOPDALLOC%
    *RUNALLOCATION
         *FACTOR USING/TOTAL
         *DIM ACCOUNT          WHAT=%TDALLOC%INP;              WHERE=BAS(%TDALLOC%);          USING=<<<;                             TOTAL=<<<
         *DIM DATASRC          WHAT=COMPINPUT;                   WHERE=COMPINPUT;               USING=TOTALADJ;          TOTAL=<<<
         *DIM ENTITY          WHAT=BAS(COMPANY);                   WHERE=BAS(COMPANY);     USING=BAS(COMPANY);     TOTAL=BAS(COMPANY)
                *DIM CATEGORY          WHAT=TARGET;                    WHERE=<<<;                                                      USING=ACTUAL;             TOTAL=<<<
    //     *DIM DEPARTMENT     WHAT=NODEPT;                          WHERE=[TOBEALLOC]="Y";                 USING=<<<;                        TOTAL=<<<
         *DIM DEPARTMENT     WHAT=NODEPT;                          WHERE=BAS(DEPT);                 USING=<<<;                        TOTAL=<<<
    //     *DIM PRODUCT      WHAT=NOPROD;              WHERE=[TOBEALLOC]="Y";                         USING=<<<;               TOTAL=<<<
         *DIM PRODUCT      WHAT=NOPROD;              WHERE=BAS(PRODS);                         USING=<<<;               TOTAL=<<<
                *DIM TIME                     WHAT=%YEAR%.INP;           WHERE=BAS(%YEAR%.TOTAL);                        USING=BAS(%YEAR%(-1).TOTAL);        TOTAL=<<<
         *DIM ANALYTIC1      WHAT=NONE1;                    WHERE=BAS(ALL_ANA1);               USING=<<<;               TOTAL=<<<
    *ENDALLOCATION
    *COMMIT
    *NEXT
    Thanks so much...
    Drye

    Hi Drye,
    The select statement is used to fetch something from the membersheet based on some conditions. In your scenario, it fetching the IDs from the Account dimension where the property TOPDALLOC is equal to Y. And these IDs will be stored in a variable called TOPDALLOC.
    The XDIM statement is defining the scope of your logic. This means that your logic will work only for those members which are there in the variable TOPDALLOC.
    Next you are doing an allocation for all the members in the variable. You will get very good understanding of the allocation function from the document on allocation engine available on SDN.
    Hope this helps.

Maybe you are looking for

  • Updating Vendor of Freight Condition Type in STO

    Hi, I am facing a problem in updating KOMP-LIFNR in my program. I have below scenario I have created a Z program which gets all materials from mchb and creates a STO order thru a BAPI_PO_CREATE1. Anyway STO is getting created but i am facing a progra

  • Reading a properties file in a servlet and passing its contents to a JSP pa

    Hi all, I'm totally new to Servlet pgmg n JSP. Please can ne1 tell how to read a simple properties file (in a servlet) and pass its contents to a JSP page.Actually the reason is to fill a combo box in a JSP page with the contents of a properties file

  • Itunes 10 issued on PC

    Hi, Have just synced my iphone 4 and keep getting the following message, "you have change the settings for *** iphone" would you like to apply these changes? Can anyone advise what is happening and how to resolve this. Cheers A PC User in the United

  • SONY HDR-PJ430V on Premiere - camera shows ''offline''

    I am under Mac OS X 10.8.5 (Mountain Lion latest update).  As I had issues with my ''old'' Canon Vixia HV30 (tape-based) under CS6 (no way to capture without crashing...), I slowly switched to Final Cut Pro. Now with a brand new cam, the SONY HDR-PJ4

  • Most Recently Accessed Widget

    After the Eloqua release, has anyone else noticed the 'Most Recently Accessed' widget on the MyEloqua homepage is only displaying campaigns and not individuals emails?