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

Similar Messages

  • 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

  • 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

  • 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

  • Setting the Member & data build level dynamically

    Hello, I have got a situation where i need to set the Member & data build level dynamically based on the member. The option "Build Multidimensional down to here"(OLAPMetaoutline Menu)can be used,But when we use this option i could not perform my task as i need set the Build level dynamically based on the member level.I have to set the level dynamically for the following instance.Suppose My time dimension hierarchy is as follows: BY Year BY Quarter By Month If the year is say 1995,then quarter level & month level data is not required. If the year is say 1998,then quarter level & month level data is required. Could anyone provide a solution for dynamically setting the Member & data build level? Thanks,Sathyan

    Hi CTS,
    Thanks for ur repply,
    My source side i am having BANK_BRANCH_STATUS table has BRANCH_CODE and EOC_STATUS(possible values for this column is 'N','T','F','E' & 'B').
    The source table from which data has to tranform will be having BRANCH_CODE.
    i made odiwaitfordata as 1st step in package ,in this step the code looks like this
    OdiWaitForData "-CONTEXT=GLOBAL" "-GLOBAL_ROWCOUNT=1" "-LSCHEMA=ORACLE_FCSAILS" "-POLLINT=1000" "-RESUME_KEY_OPERATOR==" "-SQLFILTER=EOC_STATUS='E'" "-TIMEOUT=0" "-TIMEOUT_WITH_ROWS_OK=YES" "-UNIT_ROWCOUNT=>=1" "-INCREMENT_DETECTION=NO" "-TABLE_NAME=BANK_BRANCH_STATUS" "-OBJECT_TYPE=T"
    In the procedure,
    Source command-select branch_CODE from BANK_BRANCH_STATUS WHERE EOC_STATUS='E'
    Target command- Execute scenario for batch with branchid as a parameter... how to put up this in code form....could u suggest me?
    3) flag those which are executed so you don't wait for them again --how to put up this in code form....could u suggest me?
    Please sugest me,
    Thanks,
    MNK

  • 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

  • Setting default member of attribute hierarchy in MDX script. Default member not taken into account while using user defined hierarchy

    Hi all
    I have a date dimension that (type time) with attributes
    - [FiscalYear] (type years)
    - [FiscalMonth] (type months)
    - [FiscalWeek] (type weeks)
    In addition to the attributes used in the natural hierarchy, I have an attribute [PerType] containing one member comming from the relational table 'WTD' which corresponds to 'Current Date'. All other members of this attribute hierarchy are calculated members (defined in the MDX script). Examples:
    --Last year
    CREATE MEMBER CURRENTCUBE.[Date].[PerType].[LY] AS NULL,
    VISIBLE = 1;
    SCOPE([Date].[PerType].[LY]);
    SCOPE(DESCENDANTS([Date].[Fiscal].[All], [Date].[Fiscal].[Year], SELF_AND_AFTER));
    THIS = ([Measures].CurrentMember, [Date].[PerType].[WTD], ParallelPeriod([Date].[Fiscal].[Year], 1));
    END SCOPE;
    END SCOPE;
    --Month to date
    CREATE MEMBER CURRENTCUBE.[Date].[PerType].[MTD] AS NULL,
    VISIBLE = 1;
    SCOPE([Date].[PerType].[MTD]);
    SCOPE(DESCENDANTS([Date].[Fiscal].[All], [Date].[Fiscal].[Week], SELF_AND_AFTER));
    THIS = Aggregate(CrossJoin({[Date].[PerType].[WTD]}, MTD([Date].[Fiscal].CurrentMember)));
    END SCOPE;
    END SCOPE;
    --Year to date
    CREATE MEMBER CURRENTCUBE.[Date].[PerType].[YTD] AS NULL,
    VISIBLE = 1;
    SCOPE([Date].[PerType].[YTD]);
    SCOPE(DESCENDANTS([Date].[Fiscal].[All], [Date].[Fiscal].[Period], SELF_AND_AFTER));
    THIS = Aggregate(CrossJoin({[Date].[PerType].[WTD]}, YTD([Date].[Fiscal].CurrentMember)));
    END SCOPE;
    END SCOPE;
    The defalut member of FiscalWeek attribute hierarchy is set dynamically in the MDX script:
    ALTER CUBE CURRENTCUBE UPDATE DIMENSION [Date].[FiscalWeek], DEFAULT_MEMBER =
    Filter(
    [Date].[FiscalWeek].Members,
    [Date].[FiscalWeek].Properties( "FiscalWeekStartDate", TYPED) <= DateAdd("d", -2, CDate(CStr(Month(Now())) + "/" + CStr(Day(Now())) + "/" + CStr(Year(Now()))))
    AND
    [Date].[FiscalWeek].Properties( "FiscalWeekEndDate", TYPED) >= DateAdd("d", -2, CDate(CStr(Month(Now())) + "/" + CStr(Day(Now())) + "/" + CStr(Year(Now()))))
    )(0).PrevMember;
    If I run the following query:
    with member
    measures.x as [Date].[Fiscal].DefaultMember.Name
    measures.y as [Date].[FiscalWeek].DefaultMember.Name
    select
    measures.x,
    measures.y
    } on axis(0)
    from [GLWeekly]
    it gives me back correctly the default member set over the MDX script.
    I order the statements in the MDX Script so that the default period (week) is set at the beginning of the script (just after the calculate).
    I do not understand why creating the following calculated member I am obliged to specify [Date].[Fiscal].CurrentMember in the tuple to have correct results:
    MEMBER [Account].[CoA].[Standard Engagement Revenue (MTD)] AS ([Account].[CoA].[Standard Engagement Revenue], [Date].[PerType].[MTD], [Date].[Fiscal].CurrentMember)
    I would expect that:
    ([Account].[CoA].[Standard Engagement Revenue], [Date].[PerType].[MTD])
    is sufficient.
    If the default week is specified in the slicer using a member of the natural hierachy (=> [Date].[Fiscal].x) it works.
    Why can't SSAS use the default member if it is must defined in the MDX script?
    Can someone explains me this. Thanks a lot in advance.

    Hi Ina,
    have you thought about adding a dynamic statement inside the MDX script? You could define the default member like this:
    ... DEFAULT_MEMBER = iif( Day( Now() ) = 3, <expression for previous month>, <expression for current month> );
    This way you don't need to change it everytime by running a script.
    By the way, what do you mean it doesn't update the default member? When you execute this MDX what does it says?
    with member measures.x as [Dimension].[HierarchyName].DefaultMember.Name
    select { measures.x } on 0 from Cubename
    If this returns the correct name, then the problem is somewhere else. I believe it should return you the correct name. Look here, test this on Adventure Works, statement by statement and see what happens.
    ALTER
    CUBE [Adventure Works]
    UPDATE
    DIMENSION [Product].[Product Categories],
    DEFAULT_MEMBER = [Product].[Product Categories].[Category].&[1]
    with
    member measures.x
    as [Product].[Product Categories].DefaultMember.Name
    select measures.x on 0
    from [Adventure Works]
    ALTER
    CUBE [Adventure Works]
    UPDATE
    DIMENSION [Product].[Product Categories],
    DEFAULT_MEMBER = [Product].[Product Categories].[All Products]
    with
    member measures.x
    as [Product].[Product Categories].DefaultMember.Name
    select measures.x on 0
    from [Adventure Works]
    I think you can see which members are default (on related hierarchies) using
    MDX Studio. This should help you detect which attributes have not moved accordingly and hence cause problems in your report. The usual suspects are those attributes used in your last month reports. If that's too much for you, just copy paste the definition
    of the measure x and use .CurrentMember instead .DefaultMember. And so for all related hierarchies of your dimension. You can run it as one query, just put enough measures (x1, x2, ...), one for each hierarchy, ok?
    Here's a test for Day():
    with
    member measures.y
    as
    iif( Day(Now()) = 28, 'Yes', 'No' )
    select
    measures.y on 0
    from [Adventure Works]
    Today this returns Yes, tomorrow it will be No.
    Ups, I just checked one more thing. When you run the script, it sets the default member only for that session. If you execute the first two of the four statements that I've sent you, it will set the default member on Bikes and show you that.
    But, if you open another query windows and execute that select statement (only), you'll see All member instead. So, it has set it to Bikes only for the currect session. Consequence? You reports are not aware of it. So, better use dynamic statement in
    your MDX script.
    Regards,
    Tomislav Piasevoli
    Business Intelligence Specialist
    www.softpro.hr

  • 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

  • Display Dynamic Member List Variable value in the Header

    Hi
    In my HFR report im using a dynamic member list as DynList1(@POV) in the Entity Dimension; for HFM Application.
    For the Entity Parameter im using User Prompt for Entity.
    For the User Prompt im using a choice list of Four entity members. E1, E2,E3, E4.
    I have 4 member lists ML_E1,ML_E2, ML_E3, ML_E4 such that ML_E1 contains few of the descendants of E1.
    So wen i run the report i select E1 in the user prompt and the ML_E1 is used in the Report. This is working fine.
    Now, i want to display the MemberName and Description of E1 in the Header.
    Im not sure if it can be done. But wanted some confirmation from Hyperion Community on whther this can be done.If yes, please let me know how.
    Thanks
    Vibhuti

    I tried to recreate the problem like listed above, but after I add the Outputcollection of the Invoke as a parameter, there is no schema info (not even task:task) when editing the Assignment and Routing Policy section. At any rate, there weren't errors to speak of - the instance completed with "The state of this instance is Completed".
    In the meantime, I've used a while loop to loop through a sequence of approvers that are result of a query. I'll have to keep track of approvers and include them in each new payload I think.

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

  • Using Member's Property in REC

    Hi Friends,
    I have a case here where a certain dimension value is getting populated from a property of another dimension. For example, I have a dimension Emp_No. It has properties as CostObject and Entity. For each Emp_No member, we have maintained these 2 properties.
    We are starting with a For Loop, which will loop for all Employees one by one. Now while writing the data through REC statement, we are using syntax like Entity=Emp_No.Entity, CostObject=Emp_No.CostObject to populate values for these 2 dimensions. Seems like this is not working properly.
    Please note that we are in Support Pack 2
    Please check the code below: Please consider the missing sign in select statement below as not equal to. This is just after ID.
    *XDIM_MEMBERSET CATEGORY = BUDGET
    *SELECT(%Emp_No_Var%, "[ID]", "Emp_No", "ID <> 'No_Emp'")
    *FOR %For_Var% = %Emp_No_Var%
    *WHEN CostElements
    *IS 620002A
    *WHEN CostObject
    *IS No_Cost_Objects
    *WHEN DataSrc
    *IS HRMatrix
    *WHEN EE_ESG
    *IS No_EEESG
    *WHEN Entity
    *IS USHR
    *WHEN PA_PSA
    *IS No_PAPSA
    *REC(Expression = GET(Emp_No = "No_Emp"), CostElements = 620002, DataSrc = Input, Emp_No = %For_Var%, CostObject = Emp_No.CostObject, Entity = Emp_No.Entity)
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    *NEXT
    Please find below the .lgx code that is getting generated. I am showing just for one Employee, for sake of simplicity..
    *XDIM_MEMBERSET CATEGORY = BUDGET
    *WHEN COSTELEMENTS
    *IS 620002A
    *WHEN COSTOBJECT
    *IS NO_COST_OBJECTS
    *WHEN DATASRC
    *IS HRMATRIX
    *WHEN EE_ESG
    *IS NO_EEESG
    *WHEN ENTITY
    *IS USHR
    *WHEN PA_PSA
    *IS NO_PAPSA
    *REC(EXPRESSION = GET(EMP_NO = "NO_EMP"), COSTELEMENTS = 620002, DATASRC = INPUT, EMP_NO = 1040, COSTOBJECT = EMP_NO.COSTOBJECT, ENTITY = EMP_NO.ENTITY)
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    As you can see above, instead of getting the values of the property (CostObject and Entity) for Emp_No dimension, I am getting directly whatever I wrote in the logic.. Which seems to be wrong. Also note that Emp_No=1040 is getting generted propoerly.
    I did try to run the code, but this also did not work and the data is not getting posted..
    Any help would be highly appreciated !!
    Regards, Pratap

    Thanks a Lot Nilanjan.. Your help was really great for solving this
    Seems like, the problem was in For Loop. Logically, the previous script should also have worked, but no clue why we were facing issue with that.. anyways, seems like Property of a dimension can not be accessed inside a for loop, if the loop depends on the member for which we want the property to get populated..
    this is my final code, which is working perfect.. thanks a ton !!
    *XDIM_MEMBERSET CATEGORY = BUDGET
    *XDIM_MEMBERSET Emp_No = %Emp_No_Var%
    *SELECT(%Emp_No_Var%, "[ID]", "Emp_No",  "ID<> 'No_Emp'")
    *WHEN Emp_No
    *IS *
    *REC(Expression = GET(Emp_No = "No_Emp", CostElements = "620002A", CostObject = "No_Cost_Objects", DataSrc = "HRMatrix",  EE_ESG = "No_EEESG", Entity =  "USHR", PA_PSA = "No_PAPSA"  ), CostElements = 620002, DataSrc = Input, Emp_No = Emp_No.Id, CostObject = Emp_No.CostObj, Entity = Emp_No.Comp_Code)
    *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.

  • Problem in setting dynamic expiration duration from Human Task

    Hi,
    I have a BPEL process, in which the Human task expiration has to be set dynamically..
    In the , I have set the expiration duration with this :-
    <copy>
    <from expression="xp20:format-dateTime(xp20:current-dateTime(),'PT1M')"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:systemAttributes/task:expirationDuration"/>
    </copy>
    Do not get confused with 'PT1M' .. I want the duration to be 1 minute... Had I used 'PT1M' as a String and assign to the expirationDuration var, it would have caused an error... It needs to be fromatted as a Date..That's y i took this approach ... I am sure this is working fine as I have checked the payload of the task..
    It has a proper duration..
    <initiateTaskInput><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload"><initiateTask xmlns="http://xmlns.oracle.com/bpel/workflow/taskService">
    <task xmlns="http://xmlns.oracle.com/bpel/workflow/task">
    <systemAttributes>
    <expirationDuration>PT1M</expirationDuration>
    Now in the Human task definition(.task file), I have set the expiration duration with "By Expression" option in this way..
    <globalConfiguration>
    <owner>oc4jadmin</owner>
    <expirationDuration duration="/task:task/task:systemAttributes/task:expirationDuration"
    type="XPATH"/>
    </globalConfiguration>
    The problem is the task(at runtime) cannot evaluate the expirationDuration from the XPATH..
    I checked with the WF_TASK table in the orabpel schema ...
    When I use a static duration EXPIRATIONDURATION cloumn gets assigned properly (ie PT1M).. But when i take the XPATH approach, it translates to PT0S.
    Can someone look into this please ?
    Struggling with this for quite sometime...
    saptarishi

    If the Human Task shows status complete, then it's possible that there was an error in the output data association in the process. In EM do you see a fault on the output for the Human Task activity, or if PS4FP the process will go to suspended state if the data association fails.

  • Dynamic member list

    Can some one give me a complete sample dynamic member list for reference?

    Sub EnumMemberLists()
        '|                                                                            |
        '|  This block of code defines which dimensions have lists and how many       |
        '|  lists per dimension have been created.                                    |
        '|____________________________________________________________________________|
         Dim aEntityLists (2)
            Select Case HS.Dimension
              Case "Entity"
                   aEntityLists(1) = "US"
                   aEntityLists(2) = "NonUS"
                   HS.SetMemberLists aEntityLists
         End Select
    End Sub 'EnumMemberLists
    Sub EnumMembersInList()
        Select Case HS.Dimension
        '|                                                                            |
        '|  This block of code specifies the criteria for each of the entity lists.   |
        '|                                                                            |
        '|  They may be revised as needed. Note that these are dynamic lists.         |
        '|____________________________________________________________________________|
                 Case "Entity"
                   Select Case HS.MemberListID
                        Case 1
                            US_list = HS.Entity.List("FlatOrg", "[Base]")
                                 For US_loop = LBound(US_list) To UBound(US_list)
                                  If HS.Entity.UD1(US_list(US_loop)) = "US" Then
                                            HS.AddEntityToList "", US_list(US_loop)
                                  End If
                             Next
                        Case 2
                            NonUS_list = HS.Entity.List("FlatOrg", "[Base]")
                                 For NonUS_loop = LBound(NonUS_list) To UBound(NonUS_list)
                                  If HS.Entity.UD1(NonUS_list(NonUS_loop)) <> "US" Then
                                            HS.AddEntityToList "", NonUS_list(NonUS_loop)
                                  End If
                             Next
                   End Select 'Entity List
            End Select 'Entity
    End Sub 'EnumMembersInList

  • 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

Maybe you are looking for

  • LifeCycle Manager: The kind 'Note' does not exist in the CMS

    Hi there, I'm trying to promote a Crystal Report from one relatively fresh XI 3.1 environment to another fresh XI 3.1 environment (TEST to PROD) using LifeCycle Manager, and for this report, which has no dependencies, I get the following error when I

  • Final Cut Studio 2 6.0.4 and the Canon ZR65

    I can't get my new spiffy do it all and cut everyone else to the quick computer to even recognize my Canon ZR65 miniDV camera. This is a really useless situation. I have a piece that needs to be to Sundance by the 15th of Sept. and I can't do a thing

  • Problem in navigating tabs

    Hi I have one form with 2 tabs tab1 tab2      tab1 is having some text boxes, checkboxes and list box. (Master form)      tab2 is having some text boxes in tabular form and some list boxes (Details form) ...Whatever I enter in this tab i am saving ba

  • Adf business components n Ejb Concepts

    peoples. sorry for asking this silly doubts. reason behind this question. most often use the adf business components i doesnt know it. but now i am learning with help experts blogs. In some blogs, peoples using Ejb concepts. but ,some what i know ejb

  • Drag and drop in mail

    i cant drag and drop mail into folders, the same thing happens in iphoto, help