Skip to Content

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

Code at DTP Filter

Hi All,

I am using  OLAP variable to filter at DTP level , I have field called calendar year/week for this I am creating OLAP variable , I have written code in code for 0CALWEEK. I am not getting correct week of the year , please let me know if anything wrong with code.

if i_step eq 0 and i_iobjnm eq '0CALWEEK'.

    data : date type scal-date,

            wk type scal-week.

            case i_vnam.

            when 'YVAR_CALWK'.

            clear l_s_range.

            CLEAR e_t_range.

            l_s_range-sign ='I'.

            l_s_range-opt ='EQ'.

            date = sy-datum.

                          CALL FUNCTION 'DATE_GET_WEEK'


                              DATE               = date


                              WEEK               = wk.

                              l_s_range-low = wk.

                              append l_s_range to e_t_range.



Kind regards


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