Skip to Content
0
Former Member
Aug 05, 2010 at 03:37 AM

Allocation Logic and DM Package Script

32 Views

Hi guys,

I am trying to perform rent allocation where I am trying to allocate Rent (Budget) to base entities on the basis of the Actual Rent those entities had the previous year. To achieve this functionality, I am using DM Package (which I have created as its not available by default). I am facing an issue when I am trying to pass dynamically entered value to my script logic (called by the DM package) i.e. when I run the DM package, it prompts for amount to be assigned and the entities to which it need to assigned. I am capturing the values that I enter here to the script logic called by the DM package, but for some reason its not working and giving error. Could you please help me resolving this issue:

Below is the script logic and the DM package logic:

Script Logic:

//Allocation Logic

*XDIM_MEMBERSET TIME=2006.APR,2008.JAN

*XDIM_MEMBERSET ACCOUNT=RENT

*XDIM_MEMBERSET CATEGORY=BUDGET,ACTUAL

*XDIM_MEMBERSET DATASRC=INPUT

*XDIM_MEMBERSET INTCO=NON_INTERCO

*XDIM_MEMBERSET ENTITY=SOURCE.INPUT,TARGET.INPUT,ASIARENT.INPUT

*WHEN ENTITY

*IS "PASIA"

*REC(EXPRESSION=ASIARENT.INPUT,TIME=2008.JAN,CATEGORY=BUDGET)

*ENDWHEN

*COMMIT

*RUNALLOCATION

*FACTOR=USING/TOTAL

*DIM ACCOUNT WHAT=RENT; WHERE=RENT; USING=RENT; TOTAL=RENT

*DIM ENTITY WHAT=SOURCE.INPUT; WHERE=BAS(TARGET.INPUT); USING=BAS(TARGET.INPUT); TOTAL=BAS(TARGET.INPUT)

*DIM TIME WHAT=2008.JAN; WHERE=2008.JAN; USING=2006.APR; TOTAL=2006.APR

*DIM CATEGORY WHAT=BUDGET; WHERE=BUDGET; USING=ACTUAL; TOTAL=ACTUAL

*ENDALLOCATION

*WHEN ENTITY

*IS "PASIA"

*REC(EXPRESSION=0,TIME=2008.JAN,CATEGORY=BUDGET)

*ENDWHEN

*COMMIT

DM Package (Logic):

DEBUG(ON)

PROMPT(SELECTINPUT,,,,%CATEGORY_DIM%%CURRENCY_DIM%%TIME_DIM%)

PROMPT(TEXT,%ASIARENT%,"How much do you want to allocate?",)

PROMPT(TEXT,%SOURCE%,"Enter Source Entity",)

PROMPT(TEXT,%TARGET%,"Enter Target Entity",)

TASK(Execute formulas,USER,%USER%)

TASK(Execute formulas,APPSET,%APPSET%)

TASK(Execute formulas,APP,%APP%)

TASK(Execute formulas,SELECTION,%SELECTIONFILE%)

TASK(Runlogic,Allocation_test.LGF,"*FUNCTION ASIARENT=%ASIARENT%,SOURCE=%SOURCE%,TARGET=%TARGET%")

TASK(Execute formulas,RUNMODE,1)

TASK(Execute formulas,LOGICMODE,1)

TASK(Execute formulas,CHECKLCK,%CHECKLCK%)

I would highly appreciate if some one could help with this.

Thanks

Rahul