cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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-f1061a206...

2. What is the best way to accomplish this?

Thank you for your help!

View Entire Topic
former_member186338
Active Contributor
0 Kudos

Hi Lin,

If you are on BPC 10 look on *DIM_NONAGGR OSS Note 1903167

Vadim

P.S. "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)" - this guide is about BPC MS - not applicable to BPC NW!

Former Member
0 Kudos


Hi Vadim,

Thank you, that new keyword worked great for me. I had another question. I want the same allocations to run for two sets of Accounts, BAS(EXPENSES) and BAS(REVENUE). I've tried to write this in all the following ways:

*DIM ACCOUNT WHAT=BAS(EXPENSES),BAS(REVENUE);

*DIM ACCOUNT WHAT=BAS(EXPENSES, REVENUE);

This results in not recognizing members EXPENSES),BAS(REVENU) and EXPENSES,REVENUE.

I've tried to write the same allocations script twice using a different WHAT for each:

*RUNALLOCATION

*FACTOR = USING

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

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

*ENDALLOCATION

*RUNALLOCATION

*FACTOR = USING

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

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

*ENDALLOCATION

This results in  only the first allocations script running.

I've tried using a *FOR/*NEXT loop:

*FOR %ACCOUNT%=BAS(EXPENSES), BAS(REVENUE)

*RUNALLOCATION

*FACTOR = USING

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

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

*ENDALLOCATION

*NEXT

This results in only the first set running.

Any ideas?

former_member186338
Active Contributor
0 Kudos

Hi Lin,

Number of options:

1. You can create variables like:

*XDIM_MEMBERSET ACCOUNT AS %ACC%=BAS(EXPENSES, REVENUE)

or

*XDIM_MEMBERSET ACCOUNT AS %ACC1%=BAS(REVENUE)

*XDIM_MEMBERSET ACCOUNT AS %ACC2%=BAS(EXPENSES)

And then:

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

or

*DIM ACCOUNT WHAT=%ACC1%,%ACC2%; WHERE=<<<; USING=PERCENTAGE

2. If you use 2 ALLOCATION procedures remember that *ENDALLOCATION resets the scope. If you have some scope setting statements before the first RUNALLOCATION you have to duplicate the XDIM's before the second!!

Vadim

Former Member
0 Kudos

Thank you so much for your help! That worked great.

former_member200327
Active Contributor
0 Kudos

There is also an OSS Note that allows WHAT = BAS(A, B). Just search for RUNALLOCATION.