Skip to Content
avatar image
Former Member

BEx: User exit for text variable on formula

Hi experts

We have a text variable to display the calendar day on a formula.

The screen shows you on the left side the formula. On this formula the coding below calculates the calendar day, in our case: YYYYMMDD.

How do we get the external format like on the right hand side? DD.MM.YYYY

Thanks

WHEN 'ZCALDAY_TV_001'.

DATA: range_low_11B(8) type c.

IF I_STEP = 2.
LOOP AT i_t_var_range INTO loc_var_range WHERE VNAM = 'ZCALDAY_CE_011'.

clear l_s_range.
range_low_11B = loc_var_range-low.

l_s_range-low = range_low_11B.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.
ENDLOOP.
ENDIF.

Capture.JPG (13.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 01, 2015 at 06:25 AM

    Hi Thomas,

    Try to do this:

    WHEN 'ZCALDAY_TV_001'.

    DATA: range_low_11B(10) type c.

    IF I_STEP = 2.
    LOOP AT i_t_var_range INTO loc_var_range WHERE VNAM = 'ZCALDAY_CE_011'.

    clear l_s_range.
    concatenate loc_var_range-low+6(2) '.' loc_var_range-low+4(2) '.' loc_var_range-low(4) into range_low_11B.

    l_s_range-low = range_low_11B.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.

    APPEND l_s_range TO e_t_range.
    ENDLOOP.
    ENDIF.

    Regards,

    Loed

    Add comment
    10|10000 characters needed characters exceeded