Skip to Content
avatar image
Former Member

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

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 30, 2017 at 07:16 AM

    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!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 31, 2017 at 05:15 AM

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

    Add comment
    10|10000 characters needed characters exceeded