Script Logic - REC Statement

Hi,
Can we use dimension property value in REC statement?
*REC(EXPRESSION = %value%/[TIME].CURRENTMEMBER.PROPERTIES("ACCTHRS"),ACCT_PROJECT="FTE_DIRECT_BASE")
WHEN I PROCESS THE SCRIPT LOGIC I AM GETTING AN ERROR "INVALID LINE IN LOGIC SECTION: *REC........"
THANKS

Hi,
In this case, you can use LOOKUP. For instance,
*LOOKUP XXX
*DIM AAA:TIME=TIME.ACCTHRS
*ENDLOOKUP
*REC(EXPRESSION = %value%/LOOKUP(AAA),ACCT_PROJECT="FTE_DIRECT_BASE")
Hope this helps.
Regards,
YH Seo
====================================================================================================
Hi,
Can we use dimension property value in REC statement?
*REC(EXPRESSION = %value%/TIME.CURRENTMEMBER.PROPERTIES("ACCTHRS"),ACCT_PROJECT="FTE_DIRECT_BASE")
WHEN I PROCESS THE SCRIPT LOGIC I AM GETTING AN ERROR "INVALID LINE IN LOGIC SECTION: *REC........"
THANKS

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

  • Script Logic - Scoping Statement Challenge

    Dear Friends,
    I have a requirement where I need to write a script logic to calculate the net of all Balance Sheet accounts which are under a Hierarchy node (say: BALANCESHEET) and post the reversal to another Account (say: 9999999) which is also located under the hierarchy node: BALANCESHEET
    Now the tricky bit is to exlcude the posting account (9999999) when I am reading the Accounts under the hierarchy node: BALANCESHEET.
    Anyone knows how to do it ?
    Below is my code which only works when the Account: 9999999 is located outside of the hier node: BALANCESHEET
         *XDIM_MEMBERSET ACCOUNT = BAS(BALANCESHEET)
         *XDIM_MEMBERSET TIME = 2014.APR
         *WHEN TIME
         *IS 2014.APR
         *REC(FACTOR = -1, ACCOUNT=9999999)
         *ENDWHEN
    The scoping statement I wish that would work is:
         *XDIM_MEMBERSET ACCOUNT = BAS(BALANCESHEET), BUT EXCLUDE 9999999
    Appreciate any response on this.
    Thanks,

    Hi Vadim,
    I was hoping you would respond.
    Your code worked like a charm!!
    I never know until now that we could use the below statement prior to *SELECT statement and use that variable within succeeding *SELECT statement.
    *XDIM_MEMBERSET ACCOUNT AS %ACCT% = BAS(BALANCESHEET)
    Because before I tried below with no luck but never knew about above statement.
    *SELECT(%ALLBSEXIMBAL%,"[ID]",GL_ACCOUNT,"[ID]=BAS(CBS) AND [ID]<>2199999")
    Even the SAP Help doesn't have the above syntax in their documentation, how did you know about it??
    You are a genius.
    Thanks very much for helping out
    Cheers!

  • Script logic select statement error (*SELECT(%YEAR%,"[YEAR]","T_TIME","[ID]

    Hi
    i am trying to use the below statement . its giving error . pls have a look
    *SELECT(%YEAR%,"[YEAR]","T_TIME",u201D[ID]=%T_TIME_SET%u201D)
    *SELECT(%PYEAR%,"[YEAR]-1","T_TIME",u201D[ID]=%T_TIME_SET%u201D)
    *RUNALLOCATION
    *FACTOR=1
    *DIM T_MOVEMENTS WHAT = CB; WHERE=OB;
    *DIM T_TIME WHAT=MAR.%PYEAR%; WHERE=BAS(TOTAL.%YEAR%)
    *ENDALLOCATION
    *COMMIT
    The resule
    Validation status of executable file: Failed
    - Incorrect syntax near 'u201D'. in:select [YEAR] from mbrT_TIME where u201D[ID]=%T_TIME_SET%u201D
    Validation status of syntax: Failed
    - Invalid syntax found; see statements in red
    Bud if specify the year its running properly. pls  advice me whare i was wrong
    Thanks

    Hi Narsi,
    You can use the below instruction:
    *SELECT(%YEAR%,"[YEAR]","T_TIME",u201DID='%T_TIME_SET%'u201D)
    *SELECT(%PYEAR%,"[YEAR]-1","T_TIME",u201DID='%T_TIME_SET%'u201D)
    I have just added single quote before and after %T_TIME_SET% and %T_TIME_SET%
    Please try this!!
    Thanks,
    Rohit

  • 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

  • BPC Script Logic Multi-dimension REC Statement

    Hi All BPC Experts,
    The way that our data in the dimensions is setup, members in one dimension have properties that "point" to members in other dimensions.
    In this case when I write the REC statement, whilst I'm just doing arithmetic on P_ACCT, when I write the final value, I also need to specifiy the members for the dimensions CUSTOMER, ENTITY, MINE, DESTINATION.
    In the example below I hve hardcoded the CONTRACT and TIME dimension members, but going forward, this logic will be appllied to a number of CONTRACTS and TIMES so the members of the other dimensions need to be retrieved dynamically.
    *XDIM_MEMBERSET P_ACCT = CAPACITY_REV,CAPACITY_RATE,FINAL_VOLUME
    *XDIM_MEMBERSET CATEGORY=FORECAST
    *XDIM_MEMBERSET P_DATASRC=Input
    *XDIM_MEMBERSET CONTRACT=0005000001_10
    *XDIM_MEMBERSET TIME=2009.JUL
    *WHEN P_ACCT
          *IS CAPACITY_RATE
             *BEGIN
                REC(EXPRESSION=(%VALUE%[P_ACCT].[FINAL_VOLUME]),
                         CUSTOMER = CONTRACT.CUSTOMER,
                         DESTINATION = CONTRACT.DESTINATION_ID,
                         ENTITY = CONTRACT.HAUL_PC,
                         MINE = CONTRACT.MINE_ID,
                         P_ACCT = "CAPACITY_REV")
             *END
    *ENDWHEN
    *COMMIT
    My Question is twofold:
    - Can anyone see any problems with the above code, ie is this a valid way of writing the REC statement?
    - Can anyone suggest another way of writing this code?
    Best regards
    Mark Rodrigues

    Just repostoing the logic as "Code"
    *XDIM_MEMBERSET P_ACCT = CAPACITY_REV,CAPACITY_RATE,FINAL_VOLUME
    *XDIM_MEMBERSET CATEGORY=FORECAST
    *XDIM_MEMBERSET P_DATASRC=Input
    *XDIM_MEMBERSET CONTRACT=0005000001_10
    *XDIM_MEMBERSET TIME=2009.JUL
    *WHEN P_ACCT
      *IS CAPACITY_RATE
        *BEGIN
            REC(EXPRESSION=(%VALUE%P_ACCT.FINAL_VOLUME),
                                            CUSTOMER = CONTRACT.CUSTOMER,
                                            DESTINATION = CONTRACT.DESTINATION_ID,
                                            ENTITY = CONTRACT.HAUL_PC,
                                            MINE = CONTRACT.MINE_ID,
                                            P_ACCT = "CAPACITY_REV")
        *END
      *ENDWHEN
    *COMMIT

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

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

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

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

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

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

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

  • [ASK] Error in Script Logic Using WHEN

    Hello guys.
    Script logic :
    *XDIM_MEMBERSET CATEGORY = %CGY_PLAN%, %CGY_FORECAST%
    *XDIM_MEMBERSET ACCOUNT = <ALL>
    *XDIM_MEMBERSET ENTITY = <ALL>
    *XDIM_MEMBERSET TIME = %YEAR_TTL%
    *XDIM_MEMBERSET VEHICLE = <ALL>
    *XDIM_MEMBERSET BUDGET_ACT = <ALL>
    *WHEN CATEGORY
    *IS %CGY_PLAN%  // Error
      *WHEN TIME
      *IS %YEAR_TTL%
        *REC(CATEGORY = %CGY_FORECAST%, TIME = %YEAR_TTL%)
      *ENDWHEN
    *ENDWHEN
    *COMMIT
    When i validate, it is error for statement : *IS %CGY_PLAN%.
    But if that statement i change into : *IS %YEAR_TTL%; it isn't error.
    Why is this happen ? How to correct it ?
    Thank you.

    Hi,
    You have 3 variables in your script - CGY_PLAN, CGY_FORECAST, and YEAR_TTL.
    Are you passing the values to these variables through DM package?

  • Deduction maths in script logic

    Hi,
      i have a business process that goes as follow:
    total variable overhead + fixed overhead = total overhead
    total overhead - depreciation = factory overhead
      in my script logic, i have the following (please don't mind the spaces in the account dimension)
    *xdim_memberset account = total variable overhead, fixed overhead, depreciation
    *when account
    *is total variable overhead, fixed overhead
      *rec (account = "total overhead")
      *rec (account = "factory overhead", expression = (get(account="variable overhead") + get(account="fixedoverhead") - get(account="depreciation")))
    *endwhen
      the second *rec doesn't work, any idea on how to rectify this deduction situation?
    cheers

    Your *IS statement already references two accounts, so you can't reference either of these in your GET(). You need to flip things around a bit.
    This should work. You may not even need the factor=-1 in the lsat *REC. It depends on the AccType for each account.
    *xdim_memberset account = total variable overhead, fixed overhead, depreciation
    *when account
    *is total variable overhead
    *rec (account = "total overhead")
    *rec (account = "factory overhead")
    *is total fixed overhead
    *rec (account = "total overhead")
    *rec (account = "factory overhead")
    *is depreciation
    *rec (factor= -1, account = "factory overhead")
    *endwhen

  • Conditional Checking in Script Logic

    Could anyone please kindly enlightened me how I could code the following in the script logic?
    Scenario:
    IF A > 0, THEN B = C * D
    I have tried with SELECTCASE statement statement but all wouldn't work, I keep getting errors...
    SELECTCASE:
    *SELECTCASE [P_ACCT].[0005]
    *CASE > 0
             *REC(EXPRESSION= ([P_ACCT].[0004] * [P_ACCT].[0003]), P_ACCT=0001)
    *ENDSELECT
    Error:
    UJK_VALIDATION_EXCEPTION:Unknown or unimplemented keyword "*REC(EXPRESSION=IIF([MATERIAL].[LDG0005]=>0,([MATE"...
    Thank you very much in all advances.
    Best regards,
    Yen Li

    Hi Yen Li,
    Applying SELECTCASE - ENDCASE combination would not produce the desired results. Instead, use Validation Business Rules - by setting up Validation Rules and Validation Rules Details and run the Stored Procedure SPRUNVALID from the Default Logic to execute these validation rules. Call the Stored Procedure by the following syntax:
    RUN_STORED_PROCEDURE=SPRUNVALID(u2018applicationu2019,u2019categoryu2019,u2019currencyu2019,u2019%SCOPETABLE%u2019,u2019%LOGTABLE%u2019)
    Your command: u201CIf P_ACCT.0005 is > 0, multiply P_ACCT.0004 by P_ACCT.0005 and post the product in P_ACCT.0001. Otherwise do not do anything.u201D will be shown in result!
    Regards.
    Chakrapani

  • Help in script logic - problem in FOR loop

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

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

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

  • Concatenation in script logic

    Hi,
      I am using BPC 7.0 MS and i have a problem with the script logic.
      I have a combination of dimension, i.e. account=price, entity=big_state; and i have another combination of dimension, i.e. account=unit,sales , entity=country. The 'country' entity has a property called 'property1', and assuming one of the property member is 'state'.
      in a nutshell, i need to do a unit*price=sales, but they have different entities which are related through the property.
      below is what i have tried, and it's unsuccessful, i.e.my input schedule will always include combination of account=price,unit ; entity=big_state,country
    *xdim_memberset account=price,unit
    *when account
    *is unit
      rec(expression=%value%get(account=price,entity= big_ + entity.property1), account=sales)
    *endwhen
      i think it's the concatenation, i.e. entity=big_+entity.property1 that's making my script logic fail.
      any suggestions?
    Cheers

    Hi,
    You can try using something like:
    *WHEN CATEGORY
    *IS FACT
       *REC(FACTOR = 20, CATEGORY = FORECAST)
    *ENDWHEN
    Hope this helps.

Maybe you are looking for

  • Audigy 4 pro not work

    i have a Audigy 4 pro and there is no power to the box every thing is pluged in so is it rma time

  • Schedule manager -Programs for flow definition

    Dear SAP experts I would like to know which programs can be run using flow definition? can i add new programs like vendor display line item program RFITEMAP. and have email of item periodically to certain users. Tell me how selection variables TVARV

  • Finder doesn't work after updating preview.

    Hi, when I open a file and leave it selected, I can't click any folder after changing the file (» after the preview image is updated). When I try to select a folder, Finder (in column view) does not show the contents but an empty preview with 0kb - d

  • Migrating from SP 2010 to SP 2013

    I m new to sharepoint and our new project requirement is to migrate the contents from SP 2010 to SP 2013. we r not going to use any tools , so if we go manually what would be the approach to migrate the custom data to the next version. there is lot o

  • Profiling pcs

    I use ISE only for profiling ( no posturing ) and it's L3 adjent with other devices (wlc). for iphones and stuff I only need OUI=Apple and i'm good ( no need to go deeper), but I'm having problems identifiying Laptops, they show up as unknown, eventh