Skip to Content

Allocation Help

Hi All,
System : BPC 10 NW

I have a requirement where I have a set of PROFIT CENTER values.
SOURCE PC values are defined by DC_SPLIT_PERC property which have values Y against them.
For each of the SOURCE PC values, there are a set of TARGET PC's defined by DC_SPLIT_PRNT property which have TARGET PC values.
Source PC : PC_DC16 Target PC : PC_DC02,PC_DC03
Source PC : PC_DC28 Target PC : PC_DC20,PC_DC44,PC_DC47

The Source PC value(PC_DC16 = 100,PC_DC28 = 200) needs to be split into the respective Target PC based on a % driver(yellow color) maintained for each of the Target PC.
However, for each iteration of the SOURCE PC values, it takes the complete set of TARGET DC
E.g: For Source PC_DC16 with value 100, it writes the values into all 5 Target PC and in the 2nd iteration, the PC_DC28 writes into the same 5 targets and they get added up.
I am unable to split the loop in such a way that for the iteration of PC_DC16, it takes only PC_DC02 and PC_DC03

I need to restrict the loop in such a way that the Target PC are selcted only for the respective Source PC.

Code given below and LGX file attached

*SELECT(%SDC%, ID, PROFIT_CENTER, DC_SPLIT_SRC = Y )
*SELECT(%TDC%, ID, PROFIT_CENTER, DC_SPLIT_PRNT = %SDC% )
*FOR %FSDC% = %SDC% 
*FOR %FTDC% = %TDC%
*WHEN PROFIT_CENTER
*IS %FSDC%
*WHEN %FSDC%.DC_SPLIT_PRNT
*IS %FTDC%
*XDIM_MEMBERSET PROFIT_CENTER = %FSDC%
*XDIM_MEMBERSET ACCOUNT = AC_9301000
*XDIM_MEMBERSET CONT_CTRY = UTDSTATES
*XDIM_MEMBERSET FUNC_AREA = FA_9150
*XDIM_MEMBERSET TIME = 2015.11
*XDIM_MEMBERSET ENTITY = EN_1000
*XDIM_MEMBERSET AUDITTRAIL = DUAL_CREDIT
*XDIM_MEMBERSET CATEGORY = ACTUAL
*XDIM_MEMBERSET FLOW = M800
*XDIM_MEMBERSET INTERCO = IC_NONE
*XDIM_MEMBERSET RPTCURRENCY = USD
*XDIM_MEMBERSET SCOPE = S_1000
*RUNALLOCATION
*FACTOR = USING/100
*DIM ACCOUNT WHAT = AC_9301000; WHERE = <<<; USING = DC_SPLIT_PERC
*DIM CONT_CTRY WHAT = UTDSTATES; WHERE = <<<; USING = CT_NONE
*DIM FUNC_AREA WHAT = FA_9150; WHERE = <<<; USING = FA_NONE
*DIM PROFIT_CENTER WHAT = %FSDC% ; WHERE = %FTDC% ; USING = <<<
*DIM TIME WHAT = 2015.11 ; WHERE = <<<; USING = 2006.01
*ENDALLOCATION
*ENDWHEN
*ENDWHEN
*NEXT
*NEXT

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 04, 2017 at 02:35 PM

    Sorry, but the code is incorrect!

    You can't use RUNALLOCATION inside WHEN/ENDWHEN.

    Please read at least help about script logic statements.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 05, 2017 at 09:42 AM

    Solution:

    Use single property SPLIT:

    For SOURCE members fill it by "Y"

    For TARGET members fill it by SOURCE member ID

    Code (using allocation by property):

    *SELECT(%SRCS%, ID, PROFIT_CENTER, SPLIT = Y) //get SOURCE members
    *FOR %SRC%=%SRCS%
    *RUNALLOCATION
    *FACTOR = USING/100
    ...
    *DIM PROFIT_CENTER WHAT = %SRC%; WHERE=[SPLIT]="%SRC%"; USING = <<<
    ...
    *ENDALLOCATION
    *NEXT

    Easy!

    Add comment
    10|10000 characters needed characters exceeded