Concatenating a property in a REC statement

In a *REC statement I need to append a property value to a string to define the Account and have tried several iterations around the following without success:
*REC(EXPRESSION=%VALUE%,ACCOUNT=1210_ENTITY.ACCTSUFFIX)
Where the Entity.AcctSuffix property may contain ABC, so the result I would expect would be 1210_ABC
I thought I had seen a similar thread in the past but cannot locate it, so my apologies if I'm duplicating a previous discussion
Any suggestions/guidance would be appreciated.

I have exactly the same situation working for me  where I need to map data from a monthly to a weekly application, where I say:
*REC(TIMEDIM=TIMEDIM.YEAR.WMYTARGETWEEK
In this case MYTARGETWEEK is generated by a *SELECT used in a *FOR statement resulting in a weeknumber. and the ".W" are putted correctly in between.
so the result is a timemember like 2008.W52. But in this case the property is also the first part of the membername. So trying to relabel the account and testing the logic the other way around like Alwin suggests might be worth trying.
-Joost

Similar Messages

  • 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

  • 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

  • Concatenate property with two other dimension values in REC statement

    Greetings,
    I am attempting to concatenate a member property with two member values to create a this dimension member ID in a REC statement, as in the example:
                      *REC(FACTOR=1, COSTCENTER = PROFITCENTER.PCID + %DEPARTMENT% + %COMPANY%)
    So the COSTCENTER member is the concatenation of the PCID property of the current PROFTCENTER member and the ID of the current DEPARTMENT member and the ID of the current COMPANY member.
    I appreciate your help.
    Regards,
    Craig
    P.S. This syntax works fine in the Microsoft version
    Edited by: Craig Tennant on Oct 27, 2010 9:58 AM

    Gersh,
    I have tried:
    *REC(FACTOR=1, COSTCENTER = [PROFITCENTER].PCID %DEPARTMENT%) //PROFITCENTER has brackets around it and there is a space between the two.
    When I validate and save it tells me "Attribute PCID%DEPARTMENT% does not exist in dimension PROFITCENTER"
    *REC(FACTOR=1, COSTCENTER = [PROFITCENTER].PCID_%DEPARTMENT%) //PROFITCENTER has brackets and there is an underscore between the two.
    When I valiudate and save it tells me "Attribute PCID_%DEPARTMENT% does not exist in dimension PROFITCENTER"
    *REC(FACTOR=1, COSTCENTER = [PROFITCENTER].PCID [DEPARTMENT].ID) //PROFITCENTER and DEPARTMENT have brackets around them and there is a space between the two.
    When I validate and save it tells me "Member [PROFTCENTER].PCID[ does not exist"
    *REC(FACTOR=1, COSTCENTER = [PROFITCENTER].PCID_[DEPARTMENT].ID) //PROFITCENTER and DEPARTMENT have brackets around them and there is an underscore between the two.
    When I validate and save it tells me "Member [PROFTCENTER].PCID[_ does not exist"
    Again I appreciate your help and insight
    Cheers,
    Craig

  • Use property value in *REC EXPRESSION statement

    Hi,
    How can I use the value of a property in a *REC EXPRESSION statement.
    Assuming I have a property PRIORYEAR in my TIME dimension that indicates the same period in the previous year
    Example: ID: 2009.JAN, PRIORYEAR=2008.JAN
    I want to fetch the value from the PRIORYEAR with something like:
    *REC(EXPRESSION=([TIME].PRIORYEAR),ACCOUNT="RENTASPERCSALES")
    But it won't work. I tried few other options such as
    *REC(EXPRESSION=([TIME].CurrentMember.Properties("PRIORYEAR")),ACCOUNT="RENTASPERCSALES")
    to no avail.
    Any suggestion would be greatly appreciated.
    Thanks
    Regis

    Hi Regis,
    Just checking, have you tried using 'TMVL' function in your script logic. Please check the help.sap for the usgae and some examples.
    We could use TMVL in all the following places.
    - in a 'WHEN' statment
    - in an REC expression
    - and also in a scoping statement.
    We had some issues validating the script logic with TMVL in SP04 and teh same have been resolved in SP05. You might have to write the logic and validate the logic if your BPC version has any SP related issues.
    Example:
    *WHEN TIME
    *IS TMVL(-1, 2010.DEC)
    *REC(FACTOR=1, TIME=201.DEC)
    *ENDWHEN
    we could also use TMVL with a data manager prompt value such %TIME_SET%.
    Thanks

  • Dynamic tuple expression in *REC statement

    Hi there,
    I think I know the answer to this already, but here goes...
    I need to use a tuple expression in a *REC statement (in place of the old-fashioned GET) but I want it to be dynamic, so at least one of the tuple members changes at runtime.
    To use the basic example from SAP Help, but amended slightly, let's say this is the standard expression:
    *XDIM_MEMBERSET P_ACCT = CE0004010,CE0652000
    *WHEN P_ACCT
    *IS "CE0004010"
    *REC(EXPRESSION=%VALUE%/([P_ACCT].[CE0652000],[P_ACTIVITY].[LABPRD],[P_ENTITY].[E123]), P_ACCT="CE0661000")
    *ENDWHENBut what if the P_ENTITY member should be dynamic, depending on the ENTITY member the user selects in the DM package? What I WANT to do is something like this:
    *XDIM_MEMBERSET P_ACCT = CE0004010,CE0652000
    *WHEN P_ACCT
    *IS "CE0004010"
    *REC(EXPRESSION=%VALUE%/([P_ACCT].[CE0652000],[P_ACTIVITY].[LABPRD],[P_ENTITY].[%ENTITY_SET%]), P_ACCT="CE0661000")
    *ENDWHEN
    ...but it doesn't work. Is this even possible? And if so, what am I doing wrong?
    Thanks very much,
    Jason
    PS. I'm already using a lookup to pull out a tax% in the same script, so I can't use it for this as well...

    Some theory:
    You have some scope at the script start (defined by user selection in DM prompt)
    For each dimension you have variable %SOMEDIM_SET% containing initial script scope. If you change scope of some dimension using *XDIM_MEMBERSET SOMEDIM=MEM1,... you can always later restore original scope with *XDIM_MEMBERSET SOMEDIM=%SOMEDIM_SET%
    WHEN/ENDWHEN will loop records with base members of the scope before WHEN. %VALUE% is a current record value.
    You can use tuple references to other members in EXPRESSION=... Dimensions not defined in tuple will have the same base member as current record. In tuple you can also use parent members.
    You can use LOOKUP as a replacement of FLD to get member from the property of the member in current record. LOOKUP can get data from current model or other model.
    Vadim

  • Using properties in a *REC statement

    Hi
    I want to copy the result of a cost center allocation from the source cost center profit center to the destination cost center profit center.  We use a property on the cost center dimension to define the profit center of the cost center.
    I first use *RUN ALLOCATION to generate the cost center allocation results but I then need to copy the results to the right profit center.  I have written the following code to do this which validates successfully:
    *WHEN ACCOUNT
    *IS A10000
      *REC(PROFITCENTER=COSTCENTER.PROFITCENTER)
    *ENDWHEN
    However when I run it I receive the following error message:
    'RUN_LOGIC Property value not found'
    Does anybody know whether it is possible to use properties in *REC statements and if so how I should write the logic?
    Kind Regards
    Wayne

    Hi,
    Try following code. However you should be sure that all the profitcenter property members of costcenter exist in profitcenter dimension members. For example if you have a member of costcenter like na_cc and if property profitcenter of this member is blank, this code doesnt work. So you have to add a XDIM_MEMBERSET.
    XDIM_MEMBERSET COSTCENTER <,> NA_CC or
    XDIM_MEMBERSET COSTCENTER = BAS(CC)
    *WHEN ACCOUNT
    *IS A10000
    *REC(FACTOR=1, PROFITCENTER=COSTCENTER.PROFITCENTER)
    *ENDWHEN
    Hope this helps.

  • 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

  • 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

  • REC Statement with IIF

    Hi experts,
    We are using SAP BPC 7.5 SP08. I have written a script logic wherein, i am dynamically populating the opening balance(CPLCLPTCOO) to the next month
    *FOR %TIM_MEM%="2011.AUG","2011.SEP","2011.OCT","2011.NOV","2011.DEC","2012.JAN","2012.FEB","2012.MAR","2012.APR","2012.MAY","2012.JUN","2012.JUL"
    *XDIM_MEMBERSET TIME =%TIM_MEM%
    *WHEN P_ACCT2
    *IS CPLCLPTCOSA
    *REC(EXPRESSION=[P_ACCT2].[CPLCLPTCOO]+[P_ACCT2].[CPLCLPTCOTOTP]-[P_ACCT2].[CPLCLPTCOTOTOF],P_ACCT2="CPLCLPTCOO",TIME=TIME.NEXT)
    *ENDWHEN
    *COMMIT
    *NEXT
    This code is working fine. However the problem comes when the user does not give any value in the input schedule for the member  CPLCLPTCOSA in one month but gives it for subsequent months. For this i tried modifying the scipt logic as
    *FOR %TIM_MEM%="2011.AUG","2011.SEP","2011.OCT","2011.NOV","2011.DEC","2012.JAN","2012.FEB","2012.MAR","2012.APR","2012.MAY","2012.JUN","2012.JUL"
    *XDIM_MEMBERSET TIME =%TIM_MEM%
    *REC(EXPRESSION=IIF([P_ACCT2].[CPLCLPTCOSA]=0,[P_ACCT2].[CPLCLPTCOO][P_ACCT2].[CPLCLPTCOTOTP]-[P_ACCT2].[CPLCLPTCOTOTOF],[P_ACCT2].[CPLCLPTCOO][P_ACCT2].[CPLCLPTCOTOTP]-[P_ACCT2].[CPLCLPTCOTOTOF]),P_ACCT2="CPLCLPTCOO",TIME=TIME.NEXT)
    *COMMIT
    *NEXT
    However, this code doesnot work as it is giving a validation error "Invalid dimemnsion name "[P_ACCT2].[CPLCLPTCOSA" in application PLANNING"
    Can you please help me out on how i can include an IIF statement in a REC statement.
    Thanks in advance
    Edited by: Appu Del on Dec 30, 2011 4:36 PM

    place *WHEN_REF_DATA = MASTER_DATA at the beginning .Try this statement with 1 st code . Do not  try with  2 ed code . it has lot of syntax errors.
    *WHEN_REF_DATA = MASTER_DATA
    *FOR %TIM_MEM%="2011.AUG","2011.SEP","2011.OCT","2011.NOV","2011.DEC","2012.JAN","2012.FEB","2012.MAR","2012.APR","2012.MAY","2012.JUN","2012.JUL"
    *XDIM_MEMBERSET TIME =%TIM_MEM%
    *WHEN P_ACCT2
    *IS CPLCLPTCOSA
    *REC(EXPRESSION= ([P_ACCT2].[CPLCLPTCOSA]>0 )*([P_ACCT2].[CPLCLPTCOO]+[P_ACCT2].[CPLCLPTCOTOTP]-[P_ACCT2].[CPLCLPTCOTOTOF]) +  ([P_ACCT2].[CPLCLPTCOSA]<0 )* (calculation if there is no value in CPLCLPTCOSA)  ,P_ACCT2="CPLCLPTCOO",TIME=TIME.NEXT)
    *ENDWHEN
    *COMMIT
    *NEXT
    Hope this helps.

  • REC statement question

    Hello,
    I have written this rec statement
    *WHEN
    REC(EXPRESSION=%VALUE%LOOKUP)
    *ENDWHEN
    the only thing is I need to multiply it by -1. How do I add the reverse sign of this result to the REC statement. or how do i add that in the statement?
    Thanks.

    Hi,
    You can do this in a number of ways, the way i would do it is as follows:
    REC(FACTOR=-1LOOKUP)
    Tom

  • Set dynamic member to dimension in *REC statement

    BPC Experts,
    Please refer to the below script logic . In this i wanted to pass the dynamic value to the BPC dimension. For the INPUT auditidm , i want to update different AUDITID value based on the dynamic selection in BPC . But the below script logic is throwing warning message and the dynamic value to the auditid is not considered, instead it uses the variable name itself while generating the records. I m using BPC 10 version SP Level 12.
    *XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
    *XDIM_MEMBERSET TIME = %TIME_SET%
    *XDIM_MEMBERSET ACCOUNT = %ACCOUNT_SET%
    *XDIM_MEMBERSET AUDITIDM= INPUT
    *WHEN AUDITIDM
    *IS *
    *REC(EXPRESSION = %VALUE% * ($PER_INPUT$/100), AUDITIDM = $HLA_INPUT$ )
    *ENDWHEN
    *COMMIT
    PROMPT(SELECT,,,,"CATEGORY,ACCOUNT,TIME,")
    PROMPT(TEXT, %PER_INPUT%, "Input Percentage",,)
    PROMPT(COMBOBOX, %HLA_INPUT%, "Select HLA AudiitID from the list",0,"HLA_01",{"HLA_02","HLA_03","HLA_04"},)
    INFO(%EQU%,=)
    INFO(%TAB%,;)
    TASK(/CPMB/FX_RESTATMENT_LOGIC,SUSER,%USER%)
    TASK(/CPMB/FX_RESTATMENT_LOGIC,SAPPSET,%APPSET%)
    TASK(/CPMB/FX_RESTATMENT_LOGIC,SAPP,%APP%)
    TASK(/CPMB/FX_RESTATMENT_LOGIC,SELECTION,%SELECTION%)
    TASK(/CPMB/FX_RESTATMENT_LOGIC,REPLACEPARAM,PER_INPUT%EQU%%PER_INPUT%%TAB%,AUDITIDM%EQU%%HLA_INPUT%)
    TASK(/CPMB/FX_RESTATMENT_LOGIC,LOGICFILENAME,HLA.LGF)
    After the run package, warning messages shows
    ENDWHEN ACCUMULATION: 1  RECORDS ARE GENERATED.
    Invalid Members [AUDITIDM]=%HLA_INPUT%
    How to pass dynamic value to the REC statement ? Please provide your inputs

    TASK(/CPMB/FX_RESTATMENT_LOGIC,REPLACEPARAM,PER_INPUT%EQU%%PER_INPUT%
    %TAB%,AUDITIDM%EQU%%HLA_INPUT%) -> you have given comma after %TAB% remove that and use HLA_INPUT not AUDITIDM
    Correct:
    TASK(/CPMB/FX_RESTATMENT_LOGIC,REPLACEPARAM,PER_INPUT%EQU%%PER_INPUT%
    %TAB%HLA_INPUT%EQU%%HLA_INPUT%)
    Also remove inverted comma in combo box.
    Correct:
    PROMPT(COMBOBOX, %HLA_INPUT%, "Select HLA AudiitID from the list",0,HLA_01,{HLA_01,HLA_02,HLA_03,HLA_04},)
    Hope this helps..

  • Concat member names in *REC statement

    Hi Experts,
    I am trying to generate a sql register with concatenated code.
    e.g.
    *REC(account=entity.id&category.id
    If entity. id= company1 and category=actual
    I would like to generate
    account=company1actual
    Is this possible to achieve something similar?
    Regards

    Dear Pablo.Ausin,
    I has combined some words with member dimension in *REC function likes:
    *REC(account= ABC + account.ID
    Perhaps, you can change you case such as:
    *REE( account=entity.id + category.id)
    Kind Regards,
    Wandi Sutandi
    Edited by: wandi sutandi on Jan 20, 2011 6:07 AM

  • How to use dimension property in REC statement?

    Hi,
    In dimension ACCOUNT I have created additional property ZACC where I store "alternative" account numbers.
    After I load actuals from BW to "regular" accounts I want to copy values to "alternative" accounts.
    Regular accounts are hierarchy nodes and alternative are base members.
    ACCOUNT dim values looks like that:
    ID     ZACC
    A1     A.1
    A2     A.2
    A.1
    A.2
    etc.
    I wrote code below for that but when I validate I get message:
    UJK_VALIDATION_EXCEPTION:Invalid dimension "ACCOUNT].[ZACC" in model ZXC
    *XDIM_MEMBERSET TIME=2012.01
    *XDIM_MEMBERSET ZKEYFIGURE=ZBALANCE
    *SELECT(%ACC%,"[ID]",ACCOUNT,"[ZACC]<>' '")
    *FOR %AC%=%ACC%
    *WHEN ACCOUNT
    *IS BAS(%AC%)
    *REC(ACCOUNT=[ACCOUNT].[ZACC])
    *ENDWHEN
    *NEXT
    Can you suggest me how to fix my code?
    Thanks,
    Andrzej
    Message was edited by: A Ksik

    Hi Andzej,
    I will try to explain in details. If we are talking about target member override in REC like:
    *REC(EXPRESSION=%VALUE%,SOMEDIM=TARGETMEMBER,...)
    TARGETMEMBER can be:
    1. Some fixed single member
    2. Variable like %VAR%, but this %VAR% will get the value from FOR/NEXT loop (simply duplicating lines of code).
    Something like:
    *WHEN SOMEDIM
    *FOR %VAR%=MEM1,MEM2,MEM3 //lines between FOR and NEXT are duplicated
    *IS %VAR%
    *REC(EXPRESSION=%VALUE%,SOMEDIM=PREFIX%VAR%SUFFIX)
    *NEXT
    *ENDWHEN
    Where PREFIX%VAR%SUFFIX - is the target containing fixed prefix or suffix and contents of %VAR%
    The result of code processing this code will be evaluated to:
    *WHEN SOMEDIM
    *IS MEM1
    *REC(EXPRESSION=%VALUE%,SOMEDIM=PREFIXMEM1SUFFIX)
    *ENDWHEN
    *WHEN SOMEDIM
    *IS MEM2
    *REC(EXPRESSION=%VALUE%,SOMEDIM=PREFIXMEM2SUFFIX)
    *ENDWHEN
    *WHEN SOMEDIM
    *IS MEM3
    *REC(EXPRESSION=%VALUE%,SOMEDIM=PREFIXMEM3SUFFIX)
    *ENDWHEN
    This code is VERY slow and ineffective!
    In you case the code can be:
    *FOR %AC%=%ACC% //list of nodes
    //or *XDIM_MEMBERSET ACCOUNT=BAS(%AC%)
    *WHEN ACCOUNT
    *IS BAS(%AC%) //or * if XDIM
    *REC(EXPRESSION=%VALUE%,ACCOUNT="PREFIX%AC%")
    *ENDWHEN
    *NEXT
    but you will need special coding for target to support PREFIX
    3. Member property containing correct member ID, like
    SOMEDIM.SOMEPROPERTY
    In this case the member property of the current record of WHEN/ENDWHEN loop will be used as a target.
    Hope it's clear!
    B.R. Vadim

  • *REC statement not working

    Hi I have the code as below.
    I want to write to a version members which have a property value of Active = Y.
    *XDIM_MEMBERSET COMPANY_CODE = <ALL>
    *XDIM_MEMBERSET COST_CENTER = <ALL>
    *XDIM_MEMBERSET COST_ELEMENT = <ALL>
    *XDIM_MEMBERSET CUSTOMER_TYPE = <ALL>
    *XDIM_MEMBERSET PROFIT_CENTER = <ALL>
    *XDIM_MEMBERSET P_DATASRC = INPUT
    *XDIM_MEMBERSET RPTCURRENCY = LC
    //*XDIM_MEMBERSET TIME = <ALL>
    *XDIM_MEMBERSET USER_LEVEL = 01,02
    *XDIM_FILTER TIME = [TIME].PROPERTIES("CURRENTMO") = "Y"
    *XDIM_FILTER VERSION = [VERSION].PROPERTIES("ACTIVE")="Y"
    *XDIM_ADDMEMBERSET VERSION = WV
    *WHEN COST_ELEMENT.ACCTYPE
    *IS $ACCTPRPTYFROM$
    *WHEN P_DATASRC
    *IS "INPUT"
    *WHEN RPTCURRENCY
    *IS "LC"
    *WHEN VERSION
    *IS "WV"
    *WHEN USER_LEVEL
    *IS $DATATYPEFROM$
    //*WHEN TIME.CURRENTMO
    //*IS "Y"
    *REC(FACTOR=1,USER_LEVEL=$DATATYPETO$,RPTCURRENCY="LC",P_DATASRC="INPUT",VERSION=VERSION.ACTIVE)
    //I want to write the record to
    *ENDWHEN
    //*ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *COMMIT

    Hi,
    There are few duplicate filters in your code, which can be instantly removed. You can remove either of them
    1.
    *XDIM_MEMBERSET P_DATASRC = INPUT
    or
    *WHEN P_DATASRC
    *IS "INPUT"
    2.
    *XDIM_MEMBERSET RPTCURRENCY = LC
    or
    *WHEN RPTCURRENCY
    *IS "LC"
    You are using the statement
    *XDIM_MEMBERSET USER_LEVEL = 01,02
    This will filter only based on 01, and 02.
    Though you tried to use the statement,
    *WHEN USER_LEVEL
    *IS $DATATYPEFROM$
    For your purpose, try to get all the versions in a variable. Then for each of these variables, you can use *REC expression.
    Hope this helps.

Maybe you are looking for