BEX - Cumulative Prior Months Data

Question: We have a BEX query with the following required layout:

CumPriorMonths Month1 Month2 Month3 Month...

The Month1 and on is derived from an input variable range, and works well.
The issue is the cumulative prior months.

What is best way to derive this?
What does the "cumulate" checkbox in BEX do?

Answer:
Any thoughts?

Answer:
Is it possible to have 2 structures among the key figures?

Answer:
Sounds like you are already using a structure with restrictions on the Month columns off your existing variable with ofsets.
To do the cumulative column you will have to create a user exit variable and calculate your month interval.

E.g. if you are using the fiscal period variable 0P_FPER as the single selection for period. now you create a YTD variable e.g. ZCUMYEAR.

your code in the exit would look as follows:

WHEN 'ZCUMYEAR'.
LOOP AT I_T_VAR_RANGE INTO WA
WHERE VNAM = '0P_FPER'.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = WA-LOW(4)."low value,e.g.2000001
L_S_RANGE-LOW+4(3) = '001'.
L_S_RANGE-HIGH = WA-LOW. "high value = input
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
EXIT.
ENDLOOP.
APPEND L_S_RANGE TO E_T_RANGE.

then just restrict the YTD column by this user exit variable.
Copyright ?2007 - 2008 www.jt77.com