cancel
Showing results for 
Search instead for 
Did you mean: 

TMVL Error in Planning Function

Former Member
0 Kudos

Hello

When Working on the planning function of "Formula" type, i am trying to use TMVL with negative offset to fetch historical sales in the last month. However the syntax to me looks okay, but when i execute the check formula, I encounter the error.

DATA ZSTORE TYPE 0PLANT.

DATA ZMON TYPE 0FISCPER.

DATA YMON1 TYPE 0FISCPER.

DATA ZCNT TYPE I.

DATA ZREG TYPE 0REGION.

DATA ZLYSALE TYPE I.

DATA ZPER TYPE F.

ZSTORE = VARV(ZPSTORE).

ZMON = VARV(ZPCMMYY).

ZPER = VARV(PS_PV).

YMON1 = TMVL(ZMON, -12).

FOREACH ZREG, ZMON IN REFDATA.

ZLYSALE = {0RTBAINSASV, ZMON, ZP, ZRTF_C05, ZSTORE, ZREG, STO} .

{0RTBAINSASV, ZMON, ZP, ZRTF_C05, ZSTORE, ZREG, STO} = ZLYSALE + (ZLYSALE * ZPER / 100).

ENDFOR.

Error Message thown " A comma and other arguments were expected instead of )

Syntax error in row 12, column 24 u201C。

Row 12 Where TMVL is used.

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try putting in the Fiscal Year Variant in the formula :

Say, K3 is the FYV, then:

YMON1 = TMVL(ZMON, -12,K3).

Regards

Sriram

Former Member
0 Kudos

It works if i have to keep it out of the FOR Loop. But if i keep it inside the FOR loop

YMON1 = TMVL(YMON1, 1).

The error persists.

Regards

Tapan