jueves, 9 de febrero de 2023

 

SAP BW 4hana DTP ABAP Filter Range using DTP Routine


data: lv_date_low TYPE sy-datum,

lv_date_high TYPE sy-datum,

lv_date TYPE dats,

lv_month TYPE UJ_DIM_MEMBER VALUE '-2'.

lv_date = sy-datum+0(6) && '01'.

CALL FUNCTION 'UJD_ADD_MONTH_TO_DATE'

exporting

I_MONTHS = lv_month

I_OLD_DATE = lv_date

importing

E_NEW_DATE = lv_date.

lv_date_low = lv_date.

lv_date_high = sy-datum.

l_t_range-IOBJNM = '0CALDAY'.

l_t_range-FIELDNAME = 'CALDAY'.

l_t_range-sign = 'I'.

l_t_range-option = 'BT'.

l_t_range-low = lv_date_low.

l_t_range-high = lv_date_high.

append l_t_range.

p_subrc = 0.

*$*$ end of routine - insert your code only before this line *-*

endform.

*****


Source

  SAP BW 4hana DTP ABAP Filter Range using DTP Routine data: lv_date_low TYPE sy-datum, lv_date_high TYPE sy-datum, lv_date TYPE dats, lv_mo...