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.
效果:
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.
效果: