cancel
Showing results for 
Search instead for 
Did you mean: 

Offset for variable not working !

Former Member
0 Kudos

Experts,

I have to show sales for last 5 months ( in 5 diff. Columns )

So, i have written CMOD code, where i am converting System date in to Fiscal Year / Period using FM DATE_TO_PERIOD_CONVERT.

every thing works good, i do get result. but the problem is the Offset for Variable function doesnt support that.

I was hoping that, Now i can do Offset -1, -2 , -3...till -5 and i will have all 5 Periods.

But looks like its not working out.

What other logic i can use.

!!!!!!!!!!My Variable is Not ready for Input !!!!!!!!!!! So the only way i found is to convert system date to current Period and then off setting it till last 5 months. And i do need to so last 5 months starting current Period -1, -2, -3, -4 and -5

is there any other way to get current Period ( i guess only from system date ).

I think in my logic, when i do offset, its not offsetting the Period, but its off setting system date.

Please help

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I hope you have created a Formula var Char Value Variable for obtaining current period (For which you have written the code in CMOD)? If yes what have you selected in Currency/Unit Tab of the variable ? Make it date Type if not and then try, it shall work.

Regards

Raj

Edited by: Raj Rai on Jun 2, 2011 7:29 AM

Former Member
0 Kudos

check this thread :

It is similar to you requirement .

Also execute the code in CMOD and check whether the value without offset is coming correct .

The offset should work in your case .

Former Member
0 Kudos

Hi Honar,

I am pretty sure offset should work, in your customer exit, calculate the current period as using the system date, once you get that, create a variable with the same name as you defined in the customer exit and use that variable in five different restricted key figures with each with (Variable, Variable -1, Variable -2, Variable - 3 and Variable - 4). If you have done so and not working, what are you getting in each of the variables, there might be some notes which could address that issue.

thanks.

Wond