cancel
Showing results for 
Search instead for 
Did you mean: 

Last 12 months data

Former Member
0 Kudos

Hi All,

I need a help to extract last 12 months data to see invoice revenue. I have fiscal year period and variant in my info provider, is it possible to extract last 12 months data with this two time characteristics. If yes, could you please let me know how it is done?

I tried setting up offset -12 for 0FSPER variable but when I execute a query it give me error "Variable 0FPER could not be replaced."

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

ccc_ccc
Active Contributor
0 Kudos

Create variable and give range selection screen.

or

u want keep constant 12 months.

let me clear u requirement.

Regards

anr

Former Member
0 Kudos

Hi Anr,

I want to keep last 12 months constant from current month. I do not want to give a selection screen for this as I need to use this query in MDX.

Regards

Sachin

Former Member
0 Kudos

Hi,

Why do not you use the variable with customer exit as processing .

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hi Anil,

Thanks for your reply. Could you please explain in details what exactly you mean by Variables with customer exit as processing?

Regards

Sachin

Former Member
0 Kudos

Hi,

Variables(interval variable) with customer exit as processing means the vlaue will be filled for the variable using the ABAP coding coded in TCODE 'CMOD'.

You will restrict the 'invoice revenue' with this variable .

in code: you will find the current date,from this, you will fill the year to year part of the variable.And from month part of the current date you will find the period and fill the period part of the variable. This is low value.

similarly in code: you will find the current date,from this, you will fill the (year-1) to year part of the variable.And from month part of the current date you will find the previous period and fill the period part of the variable. This is high value.

with rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hi Anil,

Thanks for your quick response. Is it possible to do without coding? I think Bex has provided a option for setting up offset bt I am not sure how to use it.

Regards

Sachin

Former Member
0 Kudos

Hi,

<i>Is it possible to do without coding?</i>

I think, it must be possible.

<i>I think Bex has provided a option for setting up offset</i>

Still you can use this functionality for your requirement. Enen to do this, you have to define a variable with processing customer exit( in code you will fill current period as explained in the previous posting ) with 'single value' for 'variable represenation'.

then in the restriction you will restrict the KF with 0FSPER by the above variable.Then right click on the variable, you can see 'Specify variable offset'. Then Make sure that you have selected the 'Value range' for 'Selection' in the prompted screen.Now you can enter 2 values for offset .Enter 0 for first offset and enter 12 for second offset.

With rgds,

Anil Kumar Sharma .P

Message was edited by: Anil Kumar Sharma