cancel
Showing results for 
Search instead for 
Did you mean: 

Error for variable in custom exit

former_member212786
Participant
0 Kudos

Hi All,

I have written the below customer exit. But it gives the below error :

"Error for variable in customer enhancement ZCRNT_YEAR_4". Message Number BRAIN 649. Could you please look into this and advice.

WHEN 'ZCRNT_YEAR_4'.
IF i_step = 2.
READ TABLE i_t_var_range INTO ls_t_var_range
WITH KEY vnam = 'ZDT_TO'.

calday_l = sy-datum - 1.
y1 = calday_l(4) .
m1 = calday_l+4(2).
lv_calday = ls_t_var_range-low.

IF m1 >= 4.

CONCATENATE y1 '04' '01' INTO ls_range-low.

ELSE.

y1 = y1 - 1.

CONCATENATE y1 '04' '01' INTO ls_range-low.

ENDIF.

ls_range-high = lv_calday.
ls_range-opt = 'BT'.
ls_range-sign = 'I'.
APPEND ls_range TO e_t_range.
ENDIF.

I am getting the following error:

"Error for variable in customer enhancement ZCRNT_YEAR_4.

Message Number BRAIN 649.

Could you please advice ?

rgds,

Accepted Solutions (1)

Accepted Solutions (1)

Anand71
Active Contributor
0 Kudos

Hi,

I think there is a problem in the definition of the customer exit variable - ZCRNT_YEAR_4. Can you share screenshots of the variable settings : ZCRNT_YEAR_4 that you created in the query designer.

Regards,

Anand

Answers (2)

Answers (2)

former_member212786
Participant
0 Kudos

Hi Anand,

You are correct. The variable setting should be interval instead of single entry.

Thanks a lot.

Rgds,

Rathina

Former Member
0 Kudos

Hi,

are you sure ZDT_TO is already defined? what is a variable sequence? could you please check with debugging.

Kind regards,

Andrey