cancel
Showing results for 
Search instead for 
Did you mean: 

how to display every month and the last month quantity?

Former Member
0 Kudos

hi, expert:

In infocube, there are two infoobjects 0calmonth, 0employee and one keyfigure zsaleqty, I want to display data resutl like this:

2007.01 2007.02 2007.03 .......

last_month_qty this_month_qty last_month_qty this_month_qty last_qty this nonth_qty ......

sales_manager1 100 150 150 120 120 210 ......

sales_manager2 80 100 100 110 110 90 ......

The question is, I don't want to change my infocube, for example, add a keyfigrue and in the transformation calculate the last month quantity; or add a virtual keyfigure. Did it have other way to display the result by using common query design skill?

Thanks.

Edited by: zhu zhu on May 12, 2008 3:26 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Zhu,

You can do this at query level itself with the help of structure and offset values for calmonth.

Regards,

KK.

Former Member
0 Kudos

hi karanam,

If this query is only display one month data, use a offset values for calmonth is very easy. but I want all months data or 12 months of one year data.

Thanks.

Former Member
0 Kudos

You can use the same offset values as

"Calmonth "

"Calmonth-1" "-1" is offset value

"Calmonth-2" "-2 is offset value"

"Calmonth-3" "-3 is offset value"

"Calmonth-4" "-4 is offset value"

"Calmonth-5" "-5 is offset value"

.

.

.

.

.

You can have all the 12 months by setting all offset values according to your need.

Former Member
0 Kudos

hi,karanam:

thank your reply.

my request is: user can input a month, for example, 200705, the result display 200701,200702...200705, if user input 200706, the result display the data from 200701 to 200706. so the column is dynamic, I can't use structrue.

Former Member
0 Kudos

Hello ,

Check the following code

var1 is the user input variable and ztestvar1 is the customer exit varaible with interval option,created on 0calmonth.

when 'ztestvar1'

if i_step = 2. "after the popup

loop at i_t_var_range into loc_var_range

where vnam = 'var1'.

clear l_s_range.

mon1 = loc_var_range-low(6).

year1 = loc_var_range-low(4).

concatenate year1 '01' into firstmon.

l_s_range-low = firstmon.

l_s_range-high = mon1.

l_s_range-sign = 'I'.

l_s_range-opt = 'BT'.

append l_s_range to e_t_range.

exit.

endloop.

endif.

Former Member
0 Kudos

hi,Karthik:

Thanks.

I think you don't understand what i want.

First, in infocube, there is only one 0calmonth infoobject.

if user input 2007.02, the query result is:

2007.01 2007.02

last_month_qty this_month_qty last_month_qty

sales_manager1 100 150 150 120

sales_manager2 80 100 100 110

if user input 2007.03, the query result is:

2007.01 2007.02 2007.03 .......

last_month_qty this_month_qty last_month_qty this_month_qty last_qty this nonth_qty ......

sales_manager1 100 150 150 120 120 210 ......

sales_manager2 80 100 100 110 110 90 ......

So, 0calmonth must in column, and two CFK or RFK in 0calmonth and display current month value and last month value according user's input value.

Former Member
0 Kudos

please help.