Skip to Content
avatar image
Former Member

Error for variable in custom exit

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 16, 2017 at 05:51 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 16, 2017 at 07:59 AM

    Hi,

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

    Kind regards,

    Andrey

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 16, 2017 at 09:00 AM

    Hi Anand,

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

    Thanks a lot.

    Rgds,

    Rathina

    Add comment
    10|10000 characters needed characters exceeded