cancel
Showing results for 
Search instead for 
Did you mean: 

Previous month data

Former Member
0 Kudos

Hi gurus

I have a report that displays the qty of the current month, now my requirement is that i have to display the qty of the previous month beside the current month qty.

example. how can i achieve this

HCM qty HCM qty previous month

01/10/2005 5000 4500

thanks in advance

Sri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I think , you are using restriction keyfigure to display the the qty of the current month.So, similarly take similar restrction(as second column) for displaying the qty of the previous month ,but with offset -1 for the variable of Month.

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hi,

I'd like to make it more understandable (to what Anil said):

Create a variable on 0CALMONTH, user entry, mandatory, single value, ready for input.

Restrict your current month data with this variable.

Restrict the prev month data with the variable with offset = -1.

Instead of creation of a user entry variable you can use 0CMONTH variable (SAP exit), which will calculate current month automatically.

Best regards,

Eugene

Former Member
0 Kudos

Hi Anil

Thanks for your quick reply. Actually i am looking according to the calender day wise. In selection screen of the report i am entering the date range from and to.

For example i entered 01.10.2005 to 31.10.2005. i am getting the qty for the each day like

01.10.2005 5000

02.10.2005 2345

03.10.2005 2356

-

-

31.10.2005 4567

now i want the qty of the previous month on that particular day.

01.10.2005 5000 3500 (previous month qty)

i tried to restrict the qty on calday with offset -1.(i am confused which variable to be used). i tried using calmonth and cal day...none of them seems to be workedout.

can you plz help me.

thanks

Sri

Former Member
0 Kudos

Hi,

It is not possible, as we are saying, Because you are taking 0calday in the rows. If you do not take any date fields(either 0calmonth or 0calday) it will be possible with our suggestions. I hope, we can not display as you asking in the BW.

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

You may create 2 new variables, type customer exit and calculate their values basing on user entered data. Restrict the prev month column by a range with these 2 vars.

Or more properly - create one new var with a range.

Best regards,

Eugene

Message was edited by: Eugene Khusainov

Former Member
0 Kudos

Hi

Now i removed Ocalday from Rows and inserted 0calmonth with restriction <b>0CMONTH</b>. Now i restricted second keyfigure with 0CMONTH with -1 offset. but i dont get any results in that column.

Regards

Sri

Former Member
0 Kudos

0CMONTH should calculate CURRENT month based on the current, system date. Are you sure you have data for the current, not closed month?

And you can use a var (customer exit, range) based on 0CALDAY. It's easy to calculate the first and last days of the previous month.

Best regards,

Eugene

Former Member
0 Kudos

Hi Eugene

After removing the 0calday from the rows i could able to see the results for the current month and previous month..

i just want to know that for example today is 19th november and when i execute the query i will get the total qty upto 19th nov and for previous month what qty will be displyed i mean will it disply the qty of previous month upto 19oct or complete month of oct.

how can i do this if i want to get in calday wise.

REgards

Sri

Former Member
0 Kudos

For the prev month the query will show data for a WHOLE month.

If you need customer exit code for 0CALDAY range variable, I can come to you later.

Best regards,

Eugene

Former Member
0 Kudos

Hi,

The System display the value for the columns(KF) for the the combimation ofcharacterstic taken(in rows).The data comes for this combination from cube.

So in your report, if you take 0calday in the rows,and for example 0calday= 12th NOV 2005 row, the Column value will be the KF value of the record with 0calday = 12th NOv 2005 of the cube.

So for your report there will be value for first column, but there will not be value for second column, because there is no record for this combination in the cube. How can you expect a record with 0calday= 12th nov 2005 and

0calmonth = oct 2005.

with rgds,

Anil Kumar Sharma .P

Message was edited by: Anil Kumar Sharma

Former Member
0 Kudos

Thanks for everyone who contributed. i got the point from your explainations. i will try different combinitions and will get back to you if i have any issues.

Thanks and Regards

Srikanth

Answers (1)

Answers (1)

Former Member
0 Kudos

Generally, this would be done by having two restricted KFs, one restricted on the 0CALMONTH the user selected and the other would, and the other on 0CALMONTH with an offset of 1 (0CALMONTH - 1).

Message was edited by: Pizzaman

Oh well, looks like Anil beat me to it. Must be time for me to go to bed.