Skip to Content
0
Former Member
Jan 20, 2011 at 07:11 PM

Problem with BW exit variable on range of dates

211 Views

Hi everyone:

I have a problem with exit variables in BW, the scenary is following:

I need to generate a ratio MTD (month to date, i mean, first day of the month to actual date), for this, I enter a date by keyboard, for example 31.12.2010 and BW must return the range 01.12.2010 - 31.12.2010. The problem is what BW returns: 31.12.2010 - 31.12.2010, i mean, repeats the same date entry by keyboard.

For this porpuse I have a variable of interval type called "ZCALDAY" on infoobjeto 0CALDAY, and exit variable of interval type called "ZRANGE", the code in CMOD is the following:

DATA: L_RANGE TYPE RRS0_S_VAR_RANGE,

L_P_RANGE TYPE RRS0_S_VAR_RANGE,

L_S_RANGE TYPE RSR_S_RANGESID.

when 'ZRANGE'.

BREAK-POINT.

IF I_STEP = 2.

CLEAR l_s_range.

READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZCALDAY'.

CONCATENATE loc_var_range-low(6) '01' INTO l_s_range-low.

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.

ENDIF.

I doing Something wrong with the variables definition or on the code??

I hope you can help me....

Best regards!!!!

Cesar.