Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.

Former Member
replied

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

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question