Reg:Script logic in allocation

Hi Experts,
                  I have an issue that while running allocation the user does not need to hardcode the catagory as ACTUAL instead he need to store value in database and and get from it.
For this scenerio i have stored value in rate application (if the value is 1 then run allocation on actuals) .
i need to know is there any script to get the database value(like lookup) and check the value is "1".
Regards,
Vinoth.

Hi Gresh,
                 Thanks for your reply.
                 There is little change in the requirement as the planning cycle has 2 cycle as ACTUALS and quater planning.
                 So for every year they might change,copy actuals data or plan for this year or quater data.So i thought of get input from user before planning and saying for this year planning take actuals or quater data after which i thought of get the data from database and allocate according to that.
Regards,
Vinoth.

Similar Messages

  • Reg: Script Logic - REC Statement Variable usage

    hi friends
    Pl find enclosed the following code:
    *WHEN TIME               
    *IS TMVL(-1,2011.04)               
    *WHEN ACCOUNT               
    *IS "EXP01"               
    *REC(EXPRESSION = [TIME].[2011.04]-%VALUE%,TIME = 2011.04,ACCOUNT = EXP01A)               
    *ENDWHEN               
    *ENDWHEN               
    The above code is working fine and result is extracted but i have hardcoded , ACCOUNT=EXP01A;
    My Query is follows:
    I have used
    *WHEN ACCOUNT               
    *IS "EXP01"
    In REC i want to use concatenation of "A" To account like EXP01&"A"
    i know accunt & i want to concatenate "A" and use in REC statement like assign to variable
    var1="EXP01" & "A" and use var1 in REC
    *REC(EXPRESSION = [TIME].[2011.04]-%VALUE%,TIME = 2011.04,ACCOUNT = var1)
    i am not sure the syntax (Whether we need to put in strings)
    Also if EXP02 then var1="EXP02"&"A" and so on
    In fact i want to make this for all members in Account Dimenstion as generalised.
    Pl. verify and suggest best possibility
    Thanx & Rgds
    Srinath

    Hi Krishna
    *XDIM_MEMBERSET ACCOUNT AS %ACC% = EXP01
    *WHEN ACCOUNT
    *IS %ACC%
    REC(EXPRESSION = %VALUE%2,TIME = 2011.04,ACCOUNT = %ACC%A)
    *ENDWHEN
    Is it required to add EXP01A as below?
    XDIM_MEMBERSET ACCOUNT AS %ACC% = EXP01, EXP01A
    Also In Generalized code you have mentioned:
    Instead of Hard Coding EXP01, EXP02 can i have hierarchy of all EXP , so that if any new account added in dimension, there will be no change in script logic. Pl. can you share how to use the same.
    If above code needs to be generalised, *FOR *NEXT can be used .
    *XDIM_MEMBERSET ACCOUNT AS %ACC_LIST% = EXP01,EXP02,EXP03,EXP04
    *FOR %ACC_MBR% = %ACC_LIST%
    *WHEN ACCOUNT
    *IS %ACC_MBR%
    REC(EXPRESSION = %VALUE%2,TIME = 2011.04,ACCOUNT = %ACC_MBR%A)
    *ENDWHEN
    *NEXT
    Rgds
    Srinath

  • Allocations with Script Logic

    Hi Experts,
    We're trying to run script logic for allocations, but aren't able to sum to values to one Costelement.
    In the Account dimension we have:
    - Costelements (CE)
    - Keyfigures (KF)
    - Prices (PR)
    What we want to do is:
    write (KF_A * PR_A) + (KF_B * PR_B) to CE_A
    Any suggestions on the right syntax would be very welcome.
    Regards,
    Vincent

    Hi,
        Can you explain me clearly so that i can give you solution.
    Regards,
    Naresh.K

  • Reg: Selectively Commenting Script Logic

    Dear Experts,
    I have a situation where in the Default Logic file comprises of Allocation Logic and Currency Translation Logic, and it works fine.
    But for just one of my reports I have created an Data manager package for Allocation as it uses a different Dimension (Datasource dim instead of Product dim) when compared with the others (which are allocated based on Product).
    The allocation logic works fine if and only if i comment the Allocation Logic present in the Default logic file but this will prohibit the allocation in the remaining reports.
    Is there a way i can restrict the Allocation present in default logic and run only the manually triggered allocation without commenting in default logic so that it works fine for other reports as well.
    Please advice.
    Rgds,
    Rizwan

    I'm a little confused by your use of the word "reports." In BPC, I use the word "report" to mean something very simple -- a view into the data that is stored in the database.
    Any script logic that calculates values (for example, allocations or currency conversion) will post its results to the database. Once those results are in the database, any and all reports which point to those values will retrieve the same result. So it's not possible to have one report retrieve values that are impacted by a data manager package, while other reports ignore that data manager package.
    (However, as soon as I say that, I'll disagree with myself and say, yes of course it's possible -- in the most extreme case, create separate applications for the different business requirements. Or more frequently, use different members in datasrc or some other dimension to isolate the different values.)
    To solve your problem, you need to approach it in terms of the cube (OLAP) data structure, and then your final reports need to either include or exclude, as appropriate, the allocation results. I would recommend you not think in terms of making the code branch in different directions (based on some or other reports). Instead, the logic runs all the time, and the question should be, where do the logic results post to?
    For a very simple example, the currency conversion results always post to USD, EUR, etc. members of the RptCurrency dimension. This logic will never change the original (LC) values.
    For your allocation logic, the same approach can apply. Obviously you wouldn't use the RptCurrency dimension to differentiate the results, but perhaps a datasrc dimension (or something similar) can achieve the result you need.
    For instance think of a datasrc dimension which looks like this, one parent and two children:
    AllDatasrc
    -- InputData
    -- AllocResult
    The allocation logic only considers data in InputData, and posts the results to AllocResult. The other reports (which should not reflect the allocation) are focused on InputData, while the allocation report looks at AllDatasrc, or possibly even all 3 members to show the "before and after"
    Once you make that change, you need to decide how it impacts everything else in the application. The currency conversion logic, perhaps should now include both InputData and AllocResult. That's up to you to decide.

  • An error in Script Logic

    Hi Experts,
    I have a problem with one of the FXTranslation logicu2019s in one of my report can u please help me on that.
    The logic works fine for 2 reports out of 3, for the 3rd report I donu2019t know why itu2019s not doing the translation to USD. As far as the design of the report goes the 2 reports for which translation works fine comprises of 2 logics one for percentage allocation and other for translation from LC to USD, whereas the 3rd report needs only translation but doesnu2019t need the allocation logic to be run.
    The conversion for the 3rd report happens if I comment out the allocation logic. Both these logics are mapped to Default.LGF file. I am unable to figure out what could be the error.
    Below is the Script Logic for Aloocation and Translation:
    //Budget Allocation
    *SELECT(%CURR%,"[ID]","RPTCURRENCY","[CURRENCY_TYPE]='L' OR [CURRENCY_TYPE]='R'")
    *XDIM_MEMBERSET RPTCURRENCY=%CURR%
    *RUNALLOCATION
    *FACTOR=USING/1
    *DIM ACCOUNTB WHAT=[IS_ALLOC]='Y'; WHERE=<<<; USING=ALLOCPER
    *DIM PRODUCTM WHAT=NOPRODUCT; WHERE<>NOPRODUCT; USING=<<<
    *ENDALLOCATION
    *COMMIT
    // Currency Translation
    *SELECT(%REPORTING_CURRENCIES%, "[ID]", "RPTCURRENCY", "[REPORTING] = 'Y'")
    *SELECT(%FX_RATES%, "[ID]", "RATE", "[GROUP] = 'FX RATE'")
    // Load the rates from the RATE cube
    *LOOKUP RATE
                *DIM CATEGORY="BUDGET"
         *DIM RATEENTITY="GLOBAL"
         *DIM RATE=ACCOUNTB.RATETYPE
         *DIM SOURCECURR:INPUTCURRENCY=LEGALENTITY.CURRENCY
         *FOR %CURR%=%REPORTING_CURRENCIES%
              *DIM %CURR%:INPUTCURRENCY="%CURR%"
         *NEXT
    *ENDLOOKUP
    //  define the translation rule
    *WHEN ACCOUNTB.RATETYPE
    *IS "NOTRANS"
         // skip
    *IS %FX_RATES%
               // translate
         *FOR %CURR%=%REPORTING_CURRENCIES%
              *REC(FACTOR=LOOKUP(%CURR%)/LOOKUP(SOURCECURR),RPTCURRENCY="%CURR%")
         *NEXT
    *IS "COPYLC"
         // take as is
         *FOR %CURR%=%REPORTING_CURRENCIES%
              *REC(RPTCURRENCY="%CURR%")
         *NEXT
    *ENDWHEN
    *COMMIT
    // Default
    // FX Translation
    *include FXTranslation.lgf
    // Budget Allocation
    *include BudgetAllocation.lgf

    Hi Naresh,
    One thing that helped me solve the problem was I needed to use different set of Dimension members/property in the Logic i.e What, Where and Using to trigger off the Curency Translation.
    But please make sure that you use try to understand a unique dimension (member/property) used and use that to trigger off the translation or anything for that matter. My other two translations were working fine as the parameters i used were unique for them whereas the remaining one needed alteration in the logic only in the parameters used in What, Where and Using, so had to add one more set of Translation Logic for this exclusively.
    Another point you need to check in your Rate Application is whether you have your Reporting Currency as value 1, say for eg USD is your reporting currency then the value in Rate Application for USD must be 1, if u by mistake cleared of this value when using the Clear Data Manager Package so the multiplication with 0 results in no conversion.
    These were the two points that helped me solve my issue. I hope it helps.
    Rgds,
    Rizwan
    Edited by: Rizwan Mustaffa on Jul 13, 2009 12:09 PM

  • 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

  • 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

  • Execute custom script Logic from a package.

    Hye!
    I'm working with 7.0 NW.
    I have a custom scriplogic and I would like to execute it from a  package of Datamanager.
    Is posible?  Could you gime me an example code?.
    Thanks.

    Hi Martin,
    This is feasible.
    Once you have created a script logic, you need to create a process chain and the script logic will be linked with this process chain. Then you need to create the DM and link the process chain with this DM.
    There is one document on SDN "How to Run a Top Down Allocation within BPC NW". Please refer to this. This will take you through the process of linking a script logic to a process chain and then to link the process chain to a DM.
    Hope this helps.

  • SPRUNCALCACCOUNT passing scope from script logic

    Hi all,
    Is it possible to limit the scope of execution of SPRUNCALCACCOUNT (and other business rules calls) in the script logic?
    I'd like to run a few consolidation tasks (each for different list of entities) in a row, without propmting users to fill the parameters.
    My script is as below, and the *XDIM_MEMBERSET_LEGALENTITY clause does not seem to affect the scope - the account transformation is run for all entities.
    *XDIM_MEMBERSET LEGALENTITY  = A1004, A0602, A0758
    *SELECT (%CURR_SET%, "[ID]", "GROUPS", "CURRENCY_TYPE='R'")
    *RUN_STORED_PROCEDURE=SPRunCalcAccount(LegalApp,%CATEGORY_SET%,%CURR_SET%,A)
    *Commit
    regs,
    Mariusz Suminski

    Sorry for the slow reply on this one... This question is one that has perplexed me for a long long time, how to unravel the mysteries of the %ScopeTable% parameter.
    For my case, I'm trying to dynamically control the time periods which are calculated in SPRunCalcAccount, based on the selected category, and a property value (e.g. Category.FirstPlanMonth) so that the user isn't bothered with selecting time periods when running logic. For a mid-year update category, only July - December is to be calculated.
    My solution is a bit involved, but works quite well, as I create my own scope table. A custom stored proc accepts a few parameters, sets up a custom scope table exactly as I like, and then passes that table into the SPRunCalcAccount.
    Your stored proc may need to consider some or all of the dimensions of your application, but in my case I'm only concerned with entity/category/time. Here's how I call it from the LGF:
    // Generate a random number for use in the table name
    *SELECT (%RandomNum%, round(rand()*10000000,0),"TIME","[ID]='YYYY.INPUT'")
    *RUN_STORED_PROCEDURE=CustomScopeTableManager([%CATEGORY_SET%],[%ENTITY_SET%],[%TIME_SET%],[Custom_Scope_%RandomNum%],[CREATE])
    // Use the new scope table in a business rule.
    *RUN_STORED_PROCEDURE=SPRUNCALCACCOUNT([%APP%],[%CATEGORY_SET%],[LC],[Custom_Scope_%RandomNum%],[%Logtable%],[Test])
    // Drop the scope table.
    *RUN_STORED_PROCEDURE=CustomScopeTableManager([],[],[],[Custom_Scope_%RandomNum%],[DROP])

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

  • Script Logic: Using a property in MDX *REC statement (BPC NW)

    Hi,
    Is it possible to use a Property in an MDX statement without using  *LOOKUP() function? I have script successfully working but it takes 15 minutes to execute and would like to speed it up.
    I understand that [DIMENSION].[MEMBER].Property is not valid syntax, and do not believe NW has any other functions to resolve the issue, except *LOOKUP which takes a long time.
    Specific Example is below:
    I have a piece of script that successfully splits JV Expense by customers. A Profit Share planning driver determines the percentage that each customer is entitled to. Typically this will be 100%, but could be 50% between two customers.
    The PROFIT SHARE planning drivers records, and PARTNER_INCOME transactional records are below:
    ACCOUNT
    ENTITY
    PARTNER
    SIGNED DATA
    PROFIT_SHARE
    UK_001
    PARTNER_A
    0.5
    PROFIT_SHARE
    UK_001
    PARTNER_B
    0.5
    PROFIT_SHARE
    UK_002_PLANNING_DRIVERS
    PARTNER_B
    1.00
    PARTNER_INCOME
    UK_001
    NO_PARTNER
    $5,000
    PARTNER_INCOME
    UK_002
    NO_PARTNER
    $5,000
    UK_001 has two partners that are each entitled to 50% of the $5,000 NET PROFIT.
    For UK_002, one one single Partner is entitled to 100% of the $5,000 NET PROFIT.
    Using script logic, you can scope the Profit Share account (PROFIT_SHARE) - , and use a *REC statement to multiply this by the driver. It would look like:
    *XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
    *WHEN ACCOUNT
    IS *
    *REC (EXPRESSION = %VALUE% * ([ACCOUNT].[PROFIT_SHARE],[PARTNER].[NO_PARTNER]), ACCOUNT = PARTNER_PROFIT_SHARE)
    *ENDWHEN
    This wouldn't be a problem if the Planning Driver is always stored on the same Entity that the Income is stored on, but for UK_002, the planning driver is stored on another Entity - which is stored in a the PLAN_DRIVER_REF property of the entity. It should use UK_002_PLAN_DRIVERS
    ID (Entity)
    PLAN_DRIVER_REF
    UK_001
    UK_002
    UK_002_PLAN_DRIVERS
    UK_002_PLANNING_DRIVERS
    In this scenario, we need to switch out the Entity used in the MDX, however I do not believe you can use a property in MDX - can anyone confirm?
    I have currently implemented the *LOOKUP functionality to loop through, changing each *LOOKUP partner for each loop.
    Lookup:
    *LOOKUP PLANNING_JV_US
    *FOR %LOOP_ASLS% = %ASL_LOOKUP_LOOP_VARIABLE%        
      *DIM LOOK_%LOOP_PARTNERS%:ACCOUNT = "PROFIT_SHARE"
      *DIM LOOK_%LOOP_PARTNERS%:PARTNER= %LOOP_PARTNERS%
    *NEXT
    *DIM ENTITY = ENTITY.PLAN_DRIVER_REF                   //   Use PLAN_DRIVER_REF Property of Entity
    *ENDLOOKUP
    Scope and *REC:
    *XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
    *WHEN ACCOUNT
    IS *
    *FOR %LOOP_PARTNERS% = %PARTNER_LOOKUP_LOOP_VARIABLE%      // 1000 Partners
    *REC(EXPRESSION = %VALUE% * LOOKUP(LOOK_%LOOP_PARTNERS%), PARTNER= %LOOP_PARTNERS%, ACCOUNT = TCOJVSHAR_CALC, AUDIT_ID = PP_EXPENSE_BY_PARTNER)
    *NEXT
    *ENDWHEN
    The problem with the above, is that because the Lookup is being generated for every single Partner, there are significant numbers of loops.
    Does anyone know of another way this can be implemented in Script Logic? Otherwise we'll need to explore BAdI route.
    Thanks,
    Nick

    Hi Nick,
    Use property in LOOKUP - will dramatically speed up the calculation without FOR/NEXT.
    Vadim

  • How to auto-update of script logics after adding new dimension members?

    Hi Experts,
    Just wanna ask if BPC has a functionality that would automatically update/validate and save my script logic whenever I add new dimension members. I've added new PL accounts but they are not automatically added to my calculated BS Net Income. I had to re-validate and save my logic for it to be included in my logic and for the amounts to be computed correctly.
    Thanks,
    Marvin

    Hi Marvin,
    There is no functionality as such. we need to configure the script as and when we make any changes in the dimension members.
    Regards
    Raman

  • Use of LEFT in Script Logic

    I am having one doubt reagrding usage of excel function like LEFT, MID, RIGHT in script logic of SELECT Statement.
    Let me know with example if its possible.
    I tried the below statement:
    *SELECT(%EQACC%,"ID","ACCOUNT","LEFT(ID,6)='BE9001' AND CALC='N' AND ID<>'BE9001010'")
    But it throw the error as "invalid select statement"
    Anurodh

    Anurodh,
    what you are trying to do is not supported. As a workaround you can try to create a new property in the dimension (for example IDSHORT), putting in this filed just the first 6 characters of the ID and you can filter on it like in the following example:
    *SELECT(%EQACC%,"ID","P_ACCT","IDSHORT='CE0004' AND CALC='N'")
    Regards,
    Simmaco

Maybe you are looking for

  • Problem with an Receiver Idoc adapter

    Hi. We have just went from XI 3.0 to PI.7.10. The Receiver idoc adapter is set up in the same way as it was in XI. The problem is when two different interfaces runs at the same time I got data into the DC40-record which not belongs too this idoc but

  • IMac freezes in games

    Hallo, I have a problem with my iMac, since the 10.7.2 update my iMac is freezing in games that I'm playing. This games are not even heavy graphic games: - Day of Defeat: Source - Football Manager 2012 Demo - Uberstrike I already did Apple Hardware T

  • Final cut pro 5.0.4 compatibility with 6.0.6 (GENERAL ERROR 41)

    I'M TRYING TO OPEN A FINA CUL PROJECT I EDITED on a Mac Book Pro, apparently with a 6.0.6 version this MAC I'm trying to continue working is using a 5.0.4 version I'm trying to update Final Cut, but it says it does not need the updates for anything p

  • Undo "Always Open With"

    In the Get Info window, I innocently told Finder to open all BBEdit Lite documents with Text Wrangler. But Finder went overboard and changed ALL text files -- Eudora mailboxes, TexEdit docs, etc. -- to open in Text Wrangler. Now there are thousands o

  • TC as HD but not wireless?

    How do you hook up the Ethernet to a iMac and use the TC as a backup (but not as wireless)?