Show TOC

Function documentationTMVL Parameter Locate this document in the navigation structure

 

This optional parameter returns a time value after taking into consideration an offset value from a given time period.

Prerequisites

This function works with base member values only.

Activities

The format for this parameter is TMVL(offset, base_period). Utilize this parameter following these guidelines:

  • Offset can be either negative or positive. Only integers are allowed.

  • The base period can be a hardcoded value such as 2009.MAY, a Time script variable such as %TIME_SET%, or a Data Manager Prompt variable such as $CURPER$.

Note Note

Nested TMVL parameters such as TMVL(-1, TMVL(-3, 2009.JAN)) ) are not supported.

You can use TMVL in:

  • FACTOR/EXPRESSION within REC

  • FOR/NEXT loops

  • IS conditions inside WHEN/ENDWHEN.

  • variables, like %TIME_SET%

    The first period of the TIME_SET is used as the base period for a negative offset and the last period of the TIME_SET is used as the base period for a positive offset.

  • scope statements

    Multiple separate (not nested) TMVLs can be used in one scope statement.

When 0 is used as offset, no offset will be done for the provided time member.

End of the note.

Example Example

In this example, Actual data records are copied over to the same period in the following year with a 10 percent increase. The existing data is shown in the following table:

Category

Entity

P_ACCT

P_Activity

P_DataSrc

RptCurrency

Time

SignData

ACTUAL

C9000

CE0004010

NONE

UPLOAD

LC

2006.APR

100,891.26

ACTUAL

C9000

CE0004010

NONE

UPLOAD

LC

2006.APR

70,836.02

ACTUAL

C9000

CE0004010

NONE

UPLOAD

LC

2006.APR

15,131.67

The script used is the following:

*XDIM_MEMBERSET P_ACCT= CE0004010, CE0004020, CE0004210

*XDIM_MEMBERSET CATEGORY = ACTUAL

*XDIM_MEMBERSET ENTITY= C9000

*XDIM_MEMBERSET P_ACTIVITY=NONE

*XDIM_MEMBERSET P_DATASRC=UPLOAD

*XDIM_MEMBERSET RPTCURRENCY = LC

*XDIM_MEMBERSET TIME = 2006.APR

*WHEN CATEGORY

*IS ACTUAL

*REC(FACTOR=1.1, TIME=TMVL(12,2006.APR))

*ENDWHEN

The data that results from running the script logic is shown in the following table:

Category

Entity

P_ACCT

P_Activity

P_DataSrc

RptCurrency

Time

SignData

ACTUAL

C9000

CE0004010

NONE

UPLOAD

LC

2007.APR

110,980.40

ACTUAL

C9000

CE0004010

NONE

UPLOAD

LC

2007.APR

77,919.62

ACTUAL

C9000

CE0004010

NONE

UPLOAD

LC

2007.APR

16,644.84

End of the example.

Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or by its gross negligence.