1、获取月末最后一天日期
DATA LAST_DATE TYPE SY-DATUM. CALL FUNCTION 'LAST_DAY_OF_MONTHS' EXPORTING day_in = sy-datum IMPORTING last_day_of_month = last_date EXCEPTIONS day_in_no_date = 1 OTHERS = 2.
2、提取字符串中的数字
DATA tax_rate_char(5) TYPE c. DATA tax_rate TYPE I. tax_rate_char = ' 16%'. CALL FUNCTION 'PREPARE_STRING' EXPORTING i_valid_chars = ' 0123456789.' i_xvalid_check = 'X' i_xchar_repl = 'X' i_xtoupper = 'X' CHANGING c_string = tax_rate_char. tax_rate = tax_rate_char.