cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BPC 10.01 NW - SCRIPT LOGIC - Allocation and XDIM MEMBERSET

Former Member
0 Kudos

Hi everybody,

I'm new to BPC and I'm trying some Script Logic.

I'm trying to write an allocation which will work only for the Quarter selected.

For example, if I pick 2017.01, it will work only for 2017.01,2017.02,2017.03. If I pick 2017.04, it will work only the Q2 etc ... In the script below, whatever the Time member I pick, the allocation is done with all the months.

For so, I created a Time property "NUMQ" to define Q1, Q2 etc ...

Below the script

*SELECT (%GETYR%,"[YEAR]", TIME, "[ID]='%TIME_SET%'")

*SELECT (%GETQ%,"[NUMQ]", TIME, "[ID]='%TIME_SET%'")

*XDIM_MEMBERSET TIME = BAS(%GETYR%.%GETQ%)

*FOR %LOOPQ1% = %GETYR%.01 , %GETYR%.02 , %GETYR%.03

*RUNALLOCATION *FACTOR = USING / TOTAL

*DIM ACCOUNT WHAT=ALLOCPL ;WHERE=[ACCTYPE]="EXP"; Using=<<<

*DIM TIME WHAT= %LOOPQ1% ;WHERE=<<<; Using=<<<

*DIM CATEGORY WHAT=Budget ;WHERE=<<<; Using=Actual

*ENDALLOCATION

*NEXT

*FOR %LOOPQ2% = %GETYR%.04 , %GETYR%.05 , %GETYR%.06

*RUNALLOCATION *FACTOR = USING / TOTAL

*DIM ACCOUNT WHAT=ALLOCPL ;WHERE=[ACCTYPE]="EXP"; Using=<<<

*DIM TIME WHAT= %LOOPQ2% ;WHERE=<<<; Using=<<<

*DIM CATEGORY WHAT=Budget ;WHERE=<<<; Using=Actual

*ENDALLOCATION

*NEXT

Thanks for your help!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you! I found the issue, I had another "glitch" in my scripts

former_member186338
Active Contributor
0 Kudos

It's better to explain required logic. ..

former_member186338
Active Contributor
0 Kudos

Sorry, but I do not understand the required calculation logic for TIME. Please provide data sample!

Anyway, please remember that after:

*ENDALLOCATION

script scope is reset to initial!