SAP 获取上个月当前日期

DATA:p_month_day TYPE d.

p_month_day = p_month && ‘01’.
CALL FUNCTION ‘RSARCH_DATE_SHIFT’
EXPORTING
i_date = p_month_day
i_shift = 1
i_shift_unit = ‘MON’
i_option = ‘LT’
IMPORTING
e_date = zlast_s
EXCEPTIONS
illegal_shift_unit = 1
out_of_bounds = 2
illegal_option = 3
OTHERS = 4.

猜你喜欢

转载自blog.csdn.net/weixin_46075394/article/details/114667595
SAP