Using function module LAST_DAY_IN_PERIOD_GET
You can use the fiúnction modules FIRST_DAY_IN_PERIOD_GET and
LAST_DAY_IN_PERIOD_GET to find the first/last day of a periode.
Doing it yourself
parameters: s_year(4) type n default '2000',
s_per(2) type n default '01'.
data: my_date like sy-datum.
start-of-selection.
if s_per = '12'.
concatenate s_year s_per '31' into my_date.
else.
s_per = s_per + 1.
concatenate s_year s_per '01' into my_date.
my_date = my_date - 1.
endif.
write:/ s_aar, s_per.
write:/ my_date.