Skip to Content
0
Former Member
Jul 19, 2005 at 09:10 PM

need to find the last day of the previous month

85 Views

hi folks,

the code goes like this...

data: xt247 type t247,

monthn(30) type c,

monthnumber type i,

bforwardmonth type i.

call function 'RP_LAST_DAY_OF_MONTHS'

EXPORTING

day_in = s_date

IMPORTING

last_day_of_month = e_date.

write: 'The last day of the month', e_date.

select single * from t247 into xt247

where spras = sy-langu

and mnr = e_date+4(2).

monthnumber = xt247-mnr.

write:' The month number', monthnumber.

  • determine the previous month.

bforwardmonth = monthnumber - 1.

From here I need to determine the last day of the previous month How can I do?

Thanks for your help.

Santhosh