Skip to Content
0

Script logic help?

Nov 16, 2016 at 07:36 AM

53

avatar image
Former Member

Hi All,

We are using BPC 10.0 NW and EPM SP 24 and the below logic we are running through the DM package.

The requirement is to calculate year value by summing all base months of an account (A_MNT) and paste that value into other account (A_YR) for all base months.

l-9b3etmp.png

Below code is not working if we run for multiple years. is there any work around for multiple years in script logic?

Script:

*XDIM_MEMBERSET AUDITTRAIL=INPUT

*XDIM_MEMBERSET ACCOUNT=A_MNT

*SELECT(%YEAR3%,"[YEAR]",TIME,[ID]=%TIME_SET%)

*RUNALLOCATION

*FACTOR=1

*DIM TIME WHAT=BAS(%YEAR3%.TOTAL); WHERE=%YEAR3%.APR

*DIM ACCOUNT WHAT=A_MNT;WHERE=A_YR

*ENDALLOCATION

*RUNALLOCATION

*FACTOR=1

*DIM TIME WHAT=%YEAR3%.APR; WHERE=BAS(%YEAR3%.TOTAL)

*DIM ACCOUNT WHAT=A_YR;WHERE=A_YR

*ENDALLOCATION

We ran the logic through UJKT by passing Time members as 2016.APR,2017.MAY.

LGX:


*XDIM_MEMBERSET AUDITTRAIL=INPUT

*XDIM_MEMBERSET ACCOUNT=A_MNT

*RUNALLOCATION

*FACTOR=1

*DIM TIME WHAT=BAS(2016.TOTAL); WHERE=2016.APR

*DIM ACCOUNT WHAT=A_MNT;WHERE=A_YR

*ENDALLOCATION

*RUNALLOCATION

*FACTOR=1

*DIM TIME WHAT=2016.APR; WHERE=BAS(2016.TOTAL)

*DIM ACCOUNT WHAT=A_YR;WHERE=A_YR

*ENDALLOCATION

-------------------------------------------------------------------------------------------------------------------------------------

LOG:

FILE:\ROOT\WEBFOLDERS\ REPORTING \ADMINAPP\COSTCENTER\TEST.LGF

USER:xxxxx

APPSET:REPORTING

APPLICATION:COSTCENTER

UJK_VALIDATION_EXCEPTION:Member "2016" not exist

Thanks in Advance,

Naidu

l-9b3etmp.png (1.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Vadim Kalinin Nov 16, 2016 at 08:21 AM
0

It will not work because:

//%TIME_SET%=2016.APR,2017.MAY

*SELECT(%YEAR3%,"[YEAR]",TIME,[ID]=%TIME_SET%)

//%YEAR3%=2016,2017

As a result:

*DIM TIME WHAT=BAS(%YEAR3%.TOTAL); WHERE=%YEAR3%.APR

will be:

*DIM TIME WHAT=BAS(2016,2017.TOTAL); WHERE=2016,2017.APR

You have to use FOR NEXT loop:

*FOR %Y%=%YEAR3%

...

*DIM TIME WHAT=BAS(%Y%.TOTAL); WHERE=%Y%.APR

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 17, 2016 at 08:29 AM
0

Hi Vadim,

Thanks!, its working.

Regards,

Naidu

Share
10 |10000 characters needed characters left characters exceeded