cancel
Showing results for 
Search instead for 
Did you mean: 

Script Logic to copy data between months

Former Member
0 Kudos
83

Hi Gurus, I try to write a script logic that copies value from account HC10000  (HC10000 is a parent ) from month T1 to account HC11000 ( HC11000 is child of A ) in month T2.

I've attached the script logic that I've created and doesn't works.

Any help appreciated

Thanks

S.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186498
Active Contributor
0 Kudos

Hi Samuele,

sorry but it's not clear what you are trying to do, you want to calculate the value of a parent and write it in one of it's children?

Can you please explain better what you want do?

I see you have a lot of "not answered" question, remember that is your duty to close questions after solved and if you find yourself the solution you can add an answer with the solution and mark this as "correct answer" this will help other users with same issue to find quick the solution.

Regards

     Roberto

Former Member
0 Kudos

Hi Roberto,

I want to put the value of a parent to one of his sons to obtain correct YTD value.

Example: copy  value of the account H10000 from Jan 2014 to account H11000 in Feb 2014.

Parent : Account H10000 = Value YTD

Children:  Account H12000 = Month Variation

Children : Account H11000 = Previous Month Value.

Account H10000, H12000, H11000 are used to store Head Count data.

Regards

Samuele

former_member186498
Active Contributor
0 Kudos

Hi Samule,

I don't understood in your script how you use the account H12000 value if it's a percentage you want to multiply with the H10000 value of the previous month then you have to multiply the GET value with it's value.

Instead of olaplookup should be sufficient a GET with a SELECT

btw the select to obtain previous month is not necessary, if you set correctly the time dimension you can use the PRIOR function.

so the script can be

*SELECT(%ACC%,"ID","ACCOUNT","PARENTH1='H11000'")

*XDIM_MEMBERSET ACCOUNT=%ACC%

 

*WHEN ACCOUNTCM

*IS %ACC%

     WHEN TIME

     IS %TIME_SET%

          *REC(FACTOR=GET(ACCOUNT=%ACC%,TIME=PRIOR),CATEGORY=MANNING,ACCOUNT="H11000")

     *ENDWHEN

*ENDWHEN

*COMMIT

TIME=%TIME_SET%, after ACCOUNT="H11000", should be unnecessary but can be inserted for clarity

for better performances you can also use a runallocation that accept bas(H11000) in what instruction and where=H11000, same for time=prior in what instruction and where=%time_set%.

Regards

     Roberto

Former Member
0 Kudos

Hi Roberto, I've tried to used the script that you proposed but did not get the result that I need.

I use Runallocation and It's works correctly.

This Is the script :

*SELECT(%PREV_MONTH%,PRIOR,TIME,ID='%TIME_SET')

*XDIM_MEMBERSET CATEGORY=MANNING

*XDIM_MEMBRSET CONSOLVIEW=CONS_NONE

*RUNALLOCATION

*FACTOR=1

*DIM ACCOUNTL WHAT=BAS(HC10000);WHERE=HC11000;

*DIM TIME WHAT=%PREV_MONTH%; WHERE=%TIME_SET%;

*ENDALLOCATION

*COMMIT

Regards

Samuele

Answers (0)