on 2014 Feb 03 5:39 PM
HI ,
My requirement is simple of allocation
consider a simple Hier as below
ID | H1 | Surrogate |
America | ||
US | America | |
Canada | America | |
America_default | America | Y |
The value will be posted to the "America_default" and that value needs to be alloc for the base members of Parent "America".
This had to be dynamic.
Is there any way we can access the Surrogate(America_default) ,if the user selects the Top node(America) when execution. ??
I know a work around by adding a property and entering the Surrogate Id at the parent level and then access it via SELECT
but we have a huge Hier structure and maintaining this will be a nightmare
does anyone has a better solution ?
Thanks in advance
Aamer
Hi Aamer,
If you always attach the same suffix to the node name you can use something like:
%NODEMEMBER%_default
B.R. Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
thanks for the reply
In addition to above ,the requirement for allocation is
the user will select dimensions as below in DM package
Account =Any parent node (or leal level)
Product=Any parent Node
ProfitCenter=Any top node
Audit= ALL (top node)
and they want to allocate to the base of ProfitCenter and post it to a diff Audit member.
The slice of data for allocation should remain the same for acct and products
----CODE------------------------------
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM ACCOUNT WHAT=BAS($ACCT_NODE$) ;WHERE=<<<; Using=DRIVER_ACCT; Total=<<<
*DIM PROFITCENTER WHAT=REGION_DEFAULT ;WHERE=BAS($REGION$); Using=<<<; Total=<<<
*DIM AUDIT WHAT=BAS($ALL_AUDIT$) ;WHERE=ALLOC; Using=BAS($ALL_AUDIT$)
*DIM PRODUCT WHAT=BAS($PROD_NODE$);WHERE=<<<; Using=<<<; Total= <<<
*ENDALLOCATION
-------------------------------------------
In Audit they want USING to be complete hier, that's the reason I have not given TOTAL in that line.
I am doubt full whether the code will post properly or not,bcoz they are aggregating 3 dimensions values ?
and my 2nd question is it possible that....if we provide the user with flexibility of selection of top node or leaf level.Will we be able to handled in the code.?
Ex: If the user select child node and my code is BAS($MEMBER_NAME$)..this will give an error.
Thanks
Aamer
Easy answer for easy question: "
and my 2nd question is it possible that....if we provide the user with flexibility of selection of top node or leaf level.Will we be able to handled in the code.?
Ex: If the user select child node and my code is BAS($MEMBER_NAME$)..this will give an error."
Not possible! nodes OR base members! Different scripts for this 2 cases. No conditional code execution in script logic.
Second: if you use *FACTOR = USING/TOTAL then all *DIM are required to have both USING and TOTAL defined.
Vadim
Below is the UJKT log....(For Account & Product presently I am running on one base member for testing purpose)
LGX:
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM ACCOUNT WHAT=A901 ;WHERE=<<<; Using=3302; Total=<<<
*DIM PROFIT_CENTER WHAT=REGION_DEFAULT ;WHERE=BAS(PCG00001); Using=<<<; Total=<<<
*DIM AUDIT WHAT=BAS(ALL_AUDIT) ;WHERE=7P; Using=BAS(ALL_AUDIT)
*DIM PRODUCT WHAT=PRODUCT_11 ;WHERE=<<<; Using=<<<; Total= <<<
*ENDALLOCATION
-------------------------------------------------------------------------------------------------------------------------------------
LOG:
LOG BEGIN TIME:2014-02-05 22:56:28
USER:*****
APPSET:REV
APPLICATION:FINANCE
FACTOR:USING/TOTAL
ALLOCATION DATA REGION:
ACCOUNT:WHAT:A901,WHERE:<<<,USING:3302,TOTAL:<<<
PROFIT_CENTER:WHAT:REGION_DEFAULT,WHERE:BAS(PCG00001),USING:<<<,TOTAL:<<<
AUDIT:WHAT:BAS(ALL_AUDIT),WHERE:7P,USING:BAS(ALL_AUDIT),TOTAL:
PRODUCT:WHAT:PRODUCT_11,WHERE:<<<,USING:<<<,TOTAL:<<<
-----------------------------------------
--Read WHAT region
[ACCOUNT] =A901
[PROFIT_CENTER] =REGION_DEFAULT
[AUDIT] =70,71,72,73,74,75,76,7F
--Time to load WHAT :0.305107 second(s).
WHAT data:5 records.
-----------------------------------------
--Read USING region
[ACCOUNT] =3302
[PROFIT_CENTER] =PCG00003,PCG00005,PCG00009,PCG00010,PCG00011,PCG00012,PCG00017,PCG00018,PCG00019
--Time to load USING :0.253782 second(s).
USING data:16 records.
-----------------------------------------
--Merge WHAT and USING
--Time to merge WHAT and USING :0.000303 second(s).
Data after merging WHAT and USING :16 records.
-----------------------------------------
--Apply factor
[ACCOUNT] =3302
[PROFIT_CENTER] =PCG00003,PCG00005,PCG00009,PCG00010,PCG00011,PCG00012,PCG00017,PCG00018,PCG00019
TOTAL data:16 records.
WHERE=WHAT *USING/TOTAL
--Time to apply factor :0.170862 second(s).
-----------------------------------------
--Read destination and calculate difference
[ACCOUNT] =A901
[PROFIT_CENTER] =PCG00003,PCG00005,PCG00009,PCG00010,PCG00011,PCG00012,PCG00017,PCG00018,PCG00019
--Time to read destination and calculate difference :0.142184 second(s).
-----------------------------------------
--Records succeeded to write back :12
--Records failed to write back 0
-----------------------------------------
--Time to run Allocation :1.681953 second(s).
SCRIPT RUNNING TIME IN TOTAL:2.27 s.
LOG END TIME:2014-02-05 22:56:28
UJKT log with the TOTAL
LGX:
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM ACCOUNT WHAT=A901 ;WHERE=<<<; Using=3302; Total=<<<
*DIM PROFIT_CENTER WHAT=REGION_DEFAULT ;WHERE=BAS(PCG00001); Using=<<<; Total=<<<
*DIM AUDIT WHAT=BAS(ALL_AUDIT) ;WHERE=7P; Using=BAS(ALL_AUDIT); Total=<<<
*DIM PRODUCT WHAT=PRODUCT_11 ;WHERE=<<<; Using=<<<; Total= <<<
*ENDALLOCATION
-------------------------------------------------------------------------------------------------------------------------------------
LOG:
USER:*****
APPSET:****
APPLICATION:*****
FACTOR:USING/TOTAL
ALLOCATION DATA REGION:
ACCOUNT:WHAT:A901,WHERE:<<<,USING:3302,TOTAL:<<<
PROFIT_CENTER:WHAT:AMS_REGION_DEFAULT,WHERE:BAS(PCG00001),USING:<<<,TOTAL:<<<
AUDIT:WHAT:BAS(ALL_AUDIT),WHERE:7P,USING:BAS(ALL_AUDIT),TOTAL:<<<
PRODUCT:WHAT:PRODUCT_11 ,WHERE:<<<,USING:<<<,TOTAL:<<<
-----------------------------------------
--Read WHAT region
[ACCOUNT] =A901
[PROFIT_CENTER] =REGION_DEFAULT
[AUDIT] =70,71,72,73,74,75,76,7F
--Time to load WHAT :0.134861 second(s).
WHAT data:5 records.
-----------------------------------------
--Read USING region
[ACCOUNT] =3302
[PROFIT_CENTER] =PCG00003,PCG00005,PCG00009,PCG00010,PCG00011,PCG00012,PCG00017,PCG00018,PCG00019
--Time to load USING :0.147687 second(s).
USING data:12 records.
-----------------------------------------
--Merge WHAT and USING
--Time to merge WHAT and USING :0.000241 second(s).
Data after merging WHAT and USING :12 records.
-----------------------------------------
--Apply factor
[ACCOUNT] =3302
[PROFIT_CENTER] =PCG00003,PCG00005,PCG00009,PCG00010,PCG00011,PCG00012,PCG00017,PCG00018,PCG00019
TOTAL data:12 records.
WHERE=WHAT *USING/TOTAL
--Time to apply factor :0.150816 second(s).
-----------------------------------------
--Read destination and calculate difference
[ACCOUNT] =A901
[PROFIT_CENTER] =PCG00003,PCG00005,PCG00009,PCG00010,PCG00011,PCG00012,PCG00017,PCG00018,PCG00019
--Time to read destination and calculate difference :0.140991 second(s).
-----------------------------------------
--Records succeeded to write back :10
--Records failed to write back 0
-----------------------------------------
--Time to run Allocation :0.634728 second(s).
SCRIPT RUNNING TIME IN TOTAL:0.87 s.
LOG END TIME:2014-02-06 20:04:08
Hi Vadim,
If TOTAL is present it doesn't post values.
When removed it posts the values.
Bur Vadim my major concern is .......Allocation is only happening for one Dim (Profit center) but for other dimensions they are selecting the Parent nodes(i.e they want to aggregate and then do allocation for the profit center).
Will my code post correct values or do i need to have for loop for this ??
Thanks
Aamer
I don't understand you:
In the previous post the values were written (10 records) with Total present:Total=<<<)
"If TOTAL is present it doesn't post values. When removed it posts the values."??
For the rest I am unable to understand the logic without looking on the model... Can you provide some SIMPLE sample that make things clear?
Vadim
Hi Jack,
The idea behind is simple:
You have something like
Parent1
Member1
Member2
Member3
Parerent1_default
Data entry is done in Parerent1_default and this value has to be allocated to base members of Parent1.
The allocation is done by DM package and the user is prompted to enter Parent1.
Then WHAT can be defined as %PARENTMEMBER%_default and WHERE as BAS(%PARENTMEMBER%)
Vadim
Hi Vadim,
just for info
I am able to handle the base members and node members by a work around in alloc .
With assigning the user selection to a variable as below.
below code for the same
*XDIM_MEMBERSET ACCOUNT AS %ACCT_VAR%=BAS(%ACCOUNT_SET%)
*XDIM_MEMBERSET PRODUCT AS %PROD_VAR%=BAS(%PRODUCT_SET%)
*XDIM_MEMBERSET AUDIT=BAS(ALL_DOCTYPE)
*FOR %ACCT%=%ACCT_VAR%
*FOR %PROD%=%PROD_VAR%
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM ACCOUNT WHAT=%ACCT% ;WHERE=<<<; Using=Driver; Total=<<<
*DIM PROFIT_CENTER WHAT=REGION_DEFAULT ;WHERE=BAS(%PROFIT_CENTER_SET%); Using=<<<; Total=<<<
*DIM AUDIT WHAT=BAS(ALL_DOCTYPE) ;WHERE=7P; Using=BAS(ALL_DOCTYPE); Total=<<<
*DIM PRODUCT WHAT= %PROD%;WHERE=<<<; Using=<<<; Total=<<<
*DIM TIME WHAT=%TIME_SET%;WHERE=<<<; Using=<<<; Total=<<<
*ENDALLOCATION
*NEXT
*NEXT
This is working...u can try for diff combinations of Parent member ,children from DM package
thanks
Aamer
User | Count |
---|---|
11 | |
4 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.