on 04-17-2012 1:54 PM
Hi,
i've struggled with a simple script all afternoon.
I have some data on a specific time dimension. TIME=SALARY.
I want to copy this "set of data" out to all time dimensions which has the attribute "BUDGET=X".
So my challenge is to isolate a specific time im my member set and copy it to multiple members..
My old script is manually maintained.
XDIM_MEMBERSET TIME = "SALARY"
*REC(EXPRESSION = %VALUE%, TIME=2012.01)
*REC(EXPRESSION = %VALUE%, TIME=2012.02)
ETC.
Now I instead want something like:
XDIM_MEMBERSET TIME = "SALARY"
*REC(EXPRESSION = %VALUE%, "ALL PERIODS WITH ATTRIBUTE BUDGET=X").
So instead of having to change my script from time to time - I can just change my masterdata.
Any suggestions or solutions ? 🙂
Regards
jdalby
Hi,
Is SALARY a member of the TIME dimension?
Try using the below script:
*XDIM_MEMBERSET TIME = SALARY
*SELECT(%MY_PERIODS%, "[ID]", TIME, "[BUDGET] = 'X'")
*WHEN TIME
*IS *
*FOR %VAR% = %MY_PERIODS%
*REC(EXPRESSION = %VALUE%, TIME=%VAR%)
*NEXT
*ENDWHEN
Or
*SELECT(%MY_PERIODS%, "[ID]", TIME, "[BUDGET] = 'X'")
*XDIM_MEMBERSET TIME = %MY_PERIODS%
*WHEN TIME
*IS *
*REC(EXPRESSION = [TIME].[SALARY])
*ENDWHEN
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
unfortunately, it doesn't work the way I want it to work. 🙂
I load data to "generic" dimensions values.
So I load to Category = SALARY and TIME = Salary.
I want to copy these loaded data to ALL the TIME and CATEGORY dimensions, which have the value "X" on a attribute (ACTIVE_BUDGET).
So if want to Filter out my loaded data:
*XDIM_MEMBERSET TIME = SALARY
*XDIM_MEMBERSET CATEGORY = SALARY
and copy the data to
TIME.ACTIVE_BUDGET =X
CATEGORY.ACTIVE_BUDGET =X
Hope this explain my problem. 🙂
regards
Joergen
Solved it..
A little workaround. On "category" I added a attribute, which Category I want to copy to:
*SELECT(%MY_PERIODS%, "[ID]", TIME, "[COPY_TO] = "X")
*XDIM_MEMBERSET TIME = TIME_SALARY
*XDIM_MEMBERSET CATEGORY = "CATEGORY_SALARY"
*WHEN TIME
*IS *
*FOR %VAR% = %MY_PERIODS%
*REC(EXPRESSION = %VALUE%, TIME = %VAR%, CATEGORY=CATEGORY.CAT_COPY_TO)
*NEXT
*ENDWHEN
regards
jdalby
Hi Joergen,
try this
*SELECT(%MY_PERIODS%, "[ID]", TIME, "[BUDGET] = 'X'")
*SELECT(%MY_CATS%, "[ID]", CATEGORY, "[BUDGET] = 'X'")
*WHEN TIME
*IS SALARY
*WHEN CATEGORY
*IS SALARY
*FOR %MY_PER% = %MY_PERIODS%
*FOR %MY_CAT% = %MY_CATS%
*REC(EXPRESSION = %VALUE%, TIME=%VAR%, CATEGORY=%MY_CAT%)
*NEXT
*NEXT
*ENDWHEN
*ENDWHEN
*COMMIT
Kind regards
Roberto
Hi Vadim Kalinin,
from a traditional SAP BW perspective, I would agree on your comment..
But given that SAP BPC is a flexible and more "out-of-the-box" system, I see no reason why not to bend the traditional rules.
Having said that, I of course would like to know - why this possibly could represent an issue ?
Thank you,
jdalby
Roberto,
thank you. Spot on.. Your suggestion worked !! 🙂
final script:
*SELECT(%MY_PERIODS%, [ID], TIME, [COPY_TO] = "X")
*SELECT(%MY_CATS%, [ID], CATEGORY, [ACT_BUD] = "X")
*WHEN TIME
*IS TIME_SALARY
*WHEN CATEGORY
*IS CATEGORY_SALARY
*FOR %PERIODS% = %MY_PERIODS%
*FOR %CATEGORIES% = %MY_CATS%
*REC(EXPRESSION = %VALUE%, TIME = %PERIODS%, CATEGORY = %CATEGORIES%)
*NEXT
*NEXT
*ENDWHEN
*ENDWHEN
*COMMIT
regards
jdalby
User | Count |
---|---|
15 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.