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

Similar Messages

  • 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

  • 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

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

  • Variable in  script logic

    Follow is the script code from previous post
    *XDIM_MEMBERSET ACCOUNT = ACC1
    *FOR %My_Var% = %ENTITY_DIM%
    *WHEN ENTITY
    *IS *
    *REC(EXPRESSION = (GET (ENTITY = %My_Var%.PROP1)), ENTITY = %My_Var%)
    *ENDWHEN
    *NEXT
    I understand that  both %My_Var% and %ENTITY_DIM% are variables, my question is how %My_Var% and %ENTITY_DIM% get the value during the process of the code, do we neeed to define the variable some where else before we use them? I remeber in FOX, we need to define the variable before we can use it.
    also is there a difference if I use $My_Var$ to replace %My_Var%?

    nilanjan,
    Thanks for the explanation,I have another question regarding to the variables.
    I need to get the YTD salary. in BPS the pseudocode code is as following:
    data YTD_salary type amount
    loop at each_month,
       YTD-Salary =  YTD-Salary  + current_month.
       if the  YTD-Salary  > FICA CAP.
       exit.
    Endloop
    How can we archive the same in BPC script logic with a variable to capture the YTD-Salary and pass it to next month?

  • 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

  • Script logic : determine the content of a variable according to a IF test

    Hello experts,
    I have the following need in a script logic
    determine the content of a variable according to a IF test
    For example I tried :
    *WHEN %ENTITY%
    *IS "CH20","CH30","ES10"
    *SELECT(%ENTITYPBPD%, "[ID]", "ENTITYCC", "[ID] = '%ENTITYCC_SET%_PBPD'")
    *ENDWHEN
    Syntax is correct but I get a query execution error (Error in WHEN/ENDWHEN structure)
    I guess it's because this when don't have any REC instructions.
    In other words, if the user selection at the package prompt step are CH20, CH30 or ES10
    the variable has to be selection_PBPD
    if another member is selected
    the variable has to take other value
    Hope I've made my need clear, and thanks in advance.
    G.

    Hi G,
    Will the *TEST_WHEN() statement work for this case?
    The way that it works is that if the condition evaluates to TRUE, then the subsequent WHEN...ENDWHEN is processed, else it is not.
    Have a look at Page 66 of "How To Use BPC Scripting Logic, Version 1.00, April 21, 2006" (It's a bit old but I use it a lot on our MS7.0 SP9 installation).
    Hope this helps.
    Regards
    Nick

  • Pass package variable to script logic

    Hi expert,
    I have creted a variable in a Package with the statement
    PROMPT(TEXT,%PERCE%,"Revaluation rate",,"")
    the variable appears and properly stores a value.
    However, what statement can be used to pass it to the sript logic?
    I tried 'TASK(Execute formulas,REPLACEPARAM,PERCE%EQU%%PERCE%) but it's somehow wrong.
    Please..any help?
    Thanks,
    Alberto Sabate

    Jeffrey,
    Thanks for your answer.
    I am aware that within the script logic I have to use a variable between $ signs. So $PERCE$ is exactly what I had in my script logic.
    However in order to get a value there we have to enter a command into the dstx file to actually send the value enter by the user into the script logic.
    In the Package I have:
    PROMPT(TEXT,%PERCE%,"Revaluation rate",,"")
    TASK(RUNLOGIC,FORMULASCRIPT,"*FUNCTION PER=%PERCE%")
    In the script I have
    *WHEN *
    IS
    *REC(FACTOR=PER.INPUT)
    *ENDWHEN
    I have also tried $PERCE$ instead of PER.INPUT, but no luck either.
    Still I'm not able to get the variable %PERCE% into the formula. Why?
    Thanks
    Alberto

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

  • Use of Variable in Script Logic

    Dear All,
    We are working on a BPC Script Logic involving depreciation calculation, which calls an implementation of the BAdI BADI_UJ_CUSTOM_LOGIC. We are passing some parameters from the script logic to the BAdI. There are two parameters to be passed: an account number (Account in which the posting will happen), and the rate (rate with which depreciation will be affected). The parameters are stored in the Dimension member of the account dimension and need to be fetched from there. We are using the following piece of code to achieve this:
    *INCLUDE FUNCTIONS.LGF
    [#PERC] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_PERCENTAGE)
    [#DEPACCOUNT] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_ACCT)
    *START_BADI DEPR
    QUERY = ON
    WRITE = ON
    DEPACCT = [#DEPACCOUNT]
    PERCENTAGE = [#PERC]
    *END_BADI
    Here, FUCNTIONS.LGF contains the PRO function, which fetches the account and percentage properties from the account dimension member. Problem is, when we refer to the temporary variables within our code using the variables [#DEPACCOUNT] and [#PERC], we encounter a short dump for CX_SY_CONVERSION_NO_NUMBER. We suspect that instead of passing the parameter values, the logic is passing the variable name as the value. How do we rectify this? What is the correct syntax for passing such a parameter to the BAdI? Any ideas?
    Thanks in Advance,
    Sid

    Hi Ethan,
    Thanks for the answer. Unfortunately, even after trying out your solution with K2 variables, we are getting the same dump, this time the log says:
    An exception with the type CX_SY_CONVERSION_NO_NUMBER occurred, but was neither handled locally, nor declared in a raising clause
    The argument '%PERC%' cannot be interpreted as a number
    We are starting to think that maybe only substitution variables can be passed as parameter to the BAdI call, because whenever we use a local variable, we end up in passing the variable name to the BAdI, and not the variable value. We digged through the SAP Help, following is the excerpt from there:
    Run the following instruction to call custom ABAP programs: where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
    *START_BADI <filter_value_of_your_BADI_implementation>
    <key1> = <value1>
    <key2> = <value2>
    *END_BADI
    where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
    Does this mean we can only pass <key>:<value> pairs, and not <key>:<variable> pairs? Is there any instance / documentation which points to this (or the contrary)?
    Awaiting answers.
    Thanks and Regards,
    Sid

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

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

Maybe you are looking for