Hi Experts,
I m working on MTD report, i m getting wrong values in place of MTD values. Let me explain the entire process what i did.
My cube contains,
Customer, Material, 0calday, Qty, Sales, Profit.
Report to be display as,
Material----
MTD(Sales)
ABC 3458
XYZ 8909
For this i created a variable ZVAR1 on 0calday to input the key date of the query(User Entry)
Created one more variable ZVAR2 on 0calday, for MTD (customer Exit)
The code what i return in CMOD for MTD is,
DATA: L_S_RANGE TYPE RSR_S_RANGESID.
DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
Data: v_loc_date type d.
Data: v_loc_date1 type d.
Data: v_loc(4) type c.
CASE I_VNAM.
WHEN 'ZVAR2'.
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZVAR1'.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(6).
L_S_RANGE-LOW+6(2) = '01'.
L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
ENDIF.
ENDCASE.
Comming to query, i maintained 0material in Rows, and in columns i created a selection(MTD), where i restricted keyfigure sales with 0calday of variable ZVAR2. In Free Characterstics panel, i maintained 0calday and restisted with variable ZVAR1.
When i execute the query, it is asking variable input for keydate, and when i enter the keydate as 13/08/2008 it is displaying only sales on 13/08/2207. Here MTD is not working.
So, can any one plz help me in this regard.
Thanks in advance
Regards
Ramakrishna Kamurthy