Skip to Content
0
Former Member
Aug 04, 2005 at 08:42 PM

Global Variable thru Customer exiit-No working

14 Views

Hi All,

Problem: 'When using a RKF "Last 12 Months consumption"

with 0CALMONTH,Movement Type & Issue Total Stock' the query gives no value for the RKF.

I am facing a strange problem with my 0CALMONTH variable name ZCM2L12M (last 12 month including the selected month). The varible is supposed to get the value of selected Month/Year value in interval form (from another Z variable where Variable entry is single).

1. Z variable is ZSELMON (Variable entry is single)

2. DATA: L_MONTH(2) TYPE N,

L_YEAR(4) TYPE N,

L_S_RANGE TYPE RSR_S_RANGESID.

DATA: S_T_VAR_RANGE TYPE RRRANGEEXIT.

2. When 'ZCM2L12M'.

IF I_STEP = 2.

CLEAR S_T_VAR_RANGE.

LOOP AT I_T_VAR_RANGE INTO S_T_VAR_RANGE.

IF S_T_VAR_RANGE-VNAM = 'ZSELMNTH'.

L_YEAR = S_T_VAR_RANGE-LOW+0(4).

L_MONTH = S_T_VAR_RANGE-LOW+4(2).

L_S_RANGE-HIGH = L_YEAR.

L_S_RANGE-HIGH+4 = L_MONTH.

IF L_MONTH < '12'.

L_MONTH = L_MONTH + 1.

L_YEAR = L_YEAR - 1.

ELSE.

L_MONTH = '01'.

ENDIF.

L_S_RANGE-LOW = L_YEAR.

L_S_RANGE-LOW+4 = L_MONTH.

CLEAR E_T_RANGE.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

ENDIF.

ENDLOOP.

ENDIF.

Let me know if anybody can throw some light on the strange behavior of my variable.

Mahendra