Skip to Content
author's profile photo Former Member
Former Member

Dynamic re-scoping of default logic

Hi all,

I'm hoping someone can help on this logic problem -- BPC 5.1 SP5 on SQL 2005.

My sales planning application has a dimension SKU with 20,000 members, in a very well structured hierarchy. Each SKU is at level 6, and the profit centers are at level 5.

The default logic calculates sales & cogs amounts (unit * price for each SKU) as well as some discounts (which are planned at the profit center, not SKU level). There is a dummy base member for each profit center to store these discount rates.

My problem in the default logic is to expand the SKU dim scope

- when a profit-center driver changes, expand to include all SKUs in that profit center

- when a SKU quantity or price changes, expand to include the profit-center dummy member

- and of course, some times a user changes values for not just one, but many, profit centers & SKUs in a single data submission.

A SKU.ProfitCenter property flags all the relevant members to pick up, but I can't figure out how to do this in default logic. (Batch logic with *SELECTs is not a problem.)

Option 1. Use a *RUNLOGIC calling SecondLogic.LGF file, with a *SELECT inside -- this doesn't seem to work. The debug log shows that the SKU scope remains the same as the data submission, and it appears that the *SELECT is not being performed in SecondLogic.

Option 2. Use a *RUNLOGIC calling SecondLogic.LGX, as follows:

*RUNLOGIC
*DIMENSION SKU=filter([SKU].members,[SKU].properties("ProfitCenter"=[SKU].CurrentMember.Properties("ProfitCenter")))
*LOGIC=SecondLogic
*ENDRUNLOGIC

I was hoping that would work, but I get an error message after data submission:

ExecuteBaseLogic::user has no write access to the selected members of dimension : SKU

SKU dimension is secured R/W, but my user ID has write access to all members (confirmed in my ability to submit data, plus acsSKU table).

I even simplified this to hard-code a particular profit center, but still the same error:

*RUNLOGIC
*DIMENSION SKU=filter([SKU].members,[SKU].properties("PROFITCENTER"="500143"))
*LOGIC=SecondLogic
*ENDRUNLOGIC

I'd appreciate any tips on how to use this MDX filtering, or any other approach that gives this type of dynamic re-scoping in default logic.

Thanks,

Tim

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 12:26 PM

    Hi Tim,

    You are missing a bracket in your examples, after the name of the property (bracket should be closed)

    I used the following statement in an *XDIM_MEMBERSET and it is working fine. I have a also a .CurrentMember, not sure if this one makes any difference.

    
     Filter([Time].Members,[Time].CurrentMember.Properties("TIMEID")="20071200")
    
    

    Regards,

    Marcel

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.