Skip to Content
1
Aug 05, 2016 at 03:30 PM

Question about script Logic (TMVL)

543 Views

Hello Gurus,

I am in BPC 10.1. And I am trying to calculate the selected months based on the previous year, for example:

01.2017= 01.2016 * Factor. for 2016 the Category is Real and for 2017 the category is Budget (Sugerido)

For that I am doing the next script Logic:

*XDIM_MEMBERSET CATEGORIA = Real

*XDIM_MEMBERSET MONEDA = MXN

*XDIM_MEMBERSET SOCIEDAD = %SOCIEDAD_SET%

*XDIM_MEMBERSET ZRELACIONCTACEBE = NA_ZREL

*XDIM_MEMBERSET PERIODO= TMVL(-12,%PERIODO_SET%) // <- I Notice in TCODE UJKTthat this statement only returns 01.2016 so I get the value of 01.2016 for the other 01.2017,02.2017 and 03.2017.

*WHEN O_CTAS.IND

*IS HIS

*FOR %TIME% = %PERIODO_SET%

*REC(FACTOR = 1, PERIODO = %TIME%, CATEGORIA = Sugerido)

*NEXT

*ENDWHEN

*COMMIT

Here I attach the image:

Is there a way to get multiple periods with the function TMVL? I also try a SELECT but didn't work.

I also try to set SCOPE Manually as shown next:

In this case I got the sum of 01.2016, 02.2016and 03.2016 for each member 01.2017, 02.2017 and 03.2017.

What am I doing wrong to achieve the requirement?

Thanks for the posts.

Best Regards.

Attachments

test 2.png (44.5 kB)
test1.png (41.8 kB)