cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Question about script Logic (TMVL)

former_member182305
Active Participant
0 Kudos
774

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

First please read help for TMVL - it returns only single period for the list of periods.

If you want to copy month to month you have to use for next like

*FOR %T%=%PERIODO_SET%

*XDIM_MEMBERSET PERIODO=TMVL(-12,%T%)

*WHEN ...

*REC(...,PERIODO=%T%)

*ENDWHEN

*NEXT

former_member182305
Active Participant
0 Kudos

Hello Vadim,

Thank you for the post.

I read the help for TMVL, I wonder if there is a way to get dynamically the months selected by user in the Data Manager. It is the only Variable that the user select.

i.e.

I want to calculate the budget for 01.2017, 02.2017 and 03.2017 (Q1).

Select those Members and the Data manager will calculate:

01.2017 = INF*01.2016

02.2017 = INF*01.2016...

The Scope should be change dynamically depending on the user selection %PERIODO_SET% but this SET must be Year -1 for each month , and in the FOR I posted in the previou message it should mathc 01.2017 with 01.2016.

Do you think is possible.

I want to perform this vía data Manager, I wonder if it is possible, otherwise I guess it is possible using Templates with EPM fórmulas.

Best Regards.

former_member186338
Active Contributor
0 Kudos

Sorry, but in my previous message I provide you the script that is doing exactly what you want. In DM prompt you select the target months and the script will do the rest. My script is different then your script.

former_member182305
Active Participant
0 Kudos

I do apologized, I didnt notice that the code was for the scope. As soon as Intest I'll mark the reply as as solved cuz im sure that will work

regards Guru

Answers (0)