Skip to Content
0
Former Member
Dec 04, 2014 at 08:13 PM

Allocations Script Logic - Omitting WHAT/WHERE causes DM package to abort

100 Views

Hi,

I'm writing an Allocations script. I want all base level accounts under a node to allocate from CLIENT_NA to all other clients, based on a PERCENTAGE account for each CLIENT. I want each account to allocate back to itself and just allocate across clients. Below is an example of the script.

*XDIM_MEMBERSET ACCOUNT=BAS(EXPENSES)

*RUNALLOCATION

*FACTOR = USING

*DIM CLIENT WHAT=CLIENT_NA; WHERE<>CLIENT_NA; USING<>CLIENT_NA

*DIM ACCOUNT USING=PERCENTAGE

*ENDALLOCATION

When I try to run this, it aborts. If I try the below then it adds up the sum of all WHAT and allocates it to all WHERE, instead of keeping a one-to-one mapping for each account to itself.

*RUNALLOCATION

*FACTOR = USING

*DIM CLIENT WHAT=CLIENT_NA; WHERE<>CLIENT_NA; USING<>CLIENT_NA

*DIM ACCOUNT WHAT=BAS(EXPENSES); WHERE=<<<; USING=PERCENTAGE

*ENDALLOCATION

I've also tried using *FOR/*NEXT like the below, but it just comes out with the same result as the script above.

*FOR %ACCOUNT%=BAS(EXPENSES)

*RUNALLOCATION

*FACTOR = USING

*DIM CLIENT WHAT=CLIENT_NA; WHERE<>CLIENT_NA; USING<>CLIENT_NA

*DIM ACCOUNT WHAT=%ACCOUNT%; WHERE=<<<; USING=PERCENTAGE

*ENDALLOCATION

*NEXT

My questions are:

1. Why is the first script causing an abort when I should be able to omit WHAT/WHERE based on this document (Example 9, page 14)

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e09eb0c0-87b1-2b10-06be-f1061a206091?QuickLink=index&…

2. What is the best way to accomplish this?

Thank you for your help!