cancel
Showing results for 
Search instead for 
Did you mean: 

BEx: User Exit Variable

Former Member
0 Kudos

Hi experts

We have a BEx variable ZCALDAY_EV_001. This is a mandatory variable on char 0CALDAY.

This variable is used to restrict a kfg selection on 0PSTNG_DAY.

Another kfg is restricted with char 0CLEAR_DATE. An user exit variable 'ZCLEAR_DATE_CE_004' should be feeded by ZCALDAY_EV_001.

After the query is executed this exit is ignored.

Any ideas?

CASE I_VNAM.

WHEN 'ZCLEAR_DATE_CE_004'.
*DATA l_s_range type rrrangesid.

    DATA: calday_clear type d.

    IF I_STEP = 2.
      LOOP AT i_t_var_range INTO loc_var_range WHERE VNAM = 'ZCALDAY_EV_001'.
        clear l_s_range.

        calday_clear = l_s_range-low .
        calday_clear = calday_clear + 1.

        l_s_range-low = calday_clear.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        APPEND l_s_range TO e_t_range.
      ENDLOOP.
    ENDIF.

Accepted Solutions (1)

Accepted Solutions (1)

sander_vanwilligen
Active Contributor
0 Kudos

Hi Thomas,

Did you debug the BEx user-exit variable using t/code RSRT? If yes, where did you put a break-point and did it stop there? If not, please try to debug, put a break-point at line IF I_STEP = 2. and share your findings.

To be sure, please share a couple of screenshots of the BEx variable so that we can check the configuration of the variable.

Last but not least, please review the following coding: calday_clear = l_s_range-low .

I think that you have to use the work-area loc_var_range. So it must become:

calday_clear = loc_var_range-low .

Best regards,

Sander

Answers (2)

Answers (2)

former_member185132
Active Contributor
0 Kudos

I agree with Sander about the code.

However, if your requirement is to simply fill variable ZCLEAR_DATE_CE_004 with ZCALDAY_EV_001, then you could simply avoid code altogether, by making CE_004 a replacement path variable. In its settings, tell it to replace with the variable EV_001.

And if you need the +1 offset (as the code is doing), then implement that by restricting the characteristic by this CE_004, and then apply an offset of +1 there.

Loed
Active Contributor
0 Kudos

Hi,

I agree with Thomas, the error lies in the CALDAY_CLEAR line..

calday_clear = loc_var_range-low.

Regards,

Loed