One of common questions on SAP-related forums is how to get the last day of given month. While there are many functions that you can use, why not to define a simple macro?
* Macro to get the last day of month DEFINE TO_LAST_DAY. &1+6(2) = '01'. &1 = &1 + 31. &1+6(2) = '01'. &1 = &1 - 1. END-OF-DEFINITION.
Use it like that:
data: lf_date type d. lf_date = sy-datum. to_last_day lf_date.