Skip to Content
0
Former Member
Oct 30, 2015 at 04:55 AM

No value could be determined for variable ZCALMONTH2

150 Views

Hi, Below given is my Istep 2 code used, where as after given user input as CALDAY showing error as 'No value could be determined for variable ZCALMONTH2'.

CASE i_vnam.

WHEN 'ZCALMONTH2'. "Substitute your Variable name here. e.g. ZPLANYEAR

CASE i_step. "Check for step number

WHEN 2.

DATA: loc_var_range Type rrrangeexit.

DATA: l_lastmth TYPE sy-datum.

DATA: lastmth(10) TYPE c,

LV_YEAR(4) TYPE C,

L_MONTH(2) TYPE C.

CLEAR l_s_range.

LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCAL_DAY'.

lv_year = l_lastmth+0(4).

l_month = l_lastmth+4(2).

l_month = l_month - 1.

CONCATENATE lv_year l_month INTO lastmth.

l_s_range-low = lastmth .

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

exit.

CLEAR: lastmth.

endloop.

ENDCASE. "(I_STEP)

ENDCASE. "(I_VNAM) ENDFORM.