Skip to Content
0
Former Member
Mar 03, 2009 at 08:45 PM

USING/TOTAL results in a divide by zero error

35 Views

Hi Experts,

This should is in default logic and should be a simple allocation based on the headcount in each department as a percent of the total headcount.

*RUNALLOCATION

*FACTOR=USING/TOTAL

*DIM DEPT WHAT= D_750; WHERE= [ALLOCTYPE]="USFACALLOC"; USING=<<<; TOTAL=<<<

*DIM ACCOUNT WHAT=BAS(A_TTL_CONTROLLABLE);WHERE=A_6910;USING=A_9000; TOTAL=<<<

*DIM TIME WHAT=BAS(FY%YEAR%.TOTAL); WHERE=<<<; USING=FY%YEAR%.12; TOTAL=<<<

*DIM CATEGORY WHAT= FORECAST; WHERE= <<<; USING=BUDGET; TOTAL=<<<

*DIM DATASRC WHAT= TOTALADJ; WHERE= adjustment; USING=Input; TOTAL=<<<

*ENDALLOCATION

Works fine when there exists headcount, but when there are none, the logic fails with divide by zero error. I add the following line

*DIM AMOUNT TOTAL<>0;

and get an error-- An expression of non-boolean type specified in a context where a condition is expected.

At one point Piero Ferreri informed me that this was a bug that would be slated for a future release. We are on 5.0 (pre SAP release). Any thoughts??