10-07-2008 9:10 AM
CALL FUNCTION 'OIL_LAST_DAY_OF_PREVIOUS_MONTH'
EXPORTING
i_date_old = SY-DATUM
IMPORTING
E_DATE_NEW = T.
Using this function module name i calculated the previous month last date i want previous month first date
so for that which function module can i use...
Thanks,
Thiru.,
10-07-2008 9:23 AM
hi
Check these FMs
OIUREP_MONTH_FIRST_LAST "Determine 1st and last day of a month
OIL_MONTH_GET_FIRST_LAST " Determine 1st and last day of a month
Edited by: Always Learner on Oct 7, 2008 10:24 AM
10-07-2008 9:12 AM
Hi,
After calling the function module
CALL FUNCTION 'OIL_LAST_DAY_OF_PREVIOUS_MONTH'
EXPORTING
i_date_old = SY-DATUM
IMPORTING
E_DATE_NEW = T.
Change the day in the month using
t+6(2) = '01'.
Regards,
Darren
10-07-2008 9:16 AM
Here I need both starting date and end date for comparing the values
10-07-2008 9:14 AM
Hi,
Check this link
[http://www.sap-img.com/abap/determine-last-day-of-the-previous-month.htm]
Regards,
Surinder
10-07-2008 9:27 AM
10-07-2008 9:23 AM
hi
Check these FMs
OIUREP_MONTH_FIRST_LAST "Determine 1st and last day of a month
OIL_MONTH_GET_FIRST_LAST " Determine 1st and last day of a month
Edited by: Always Learner on Oct 7, 2008 10:24 AM
10-07-2008 9:30 AM
I want previous month first date and last date when i enter current month date..
For ex.,
input = 07.10.2008
output must be
01.09.2008 and 31.09.2008
10-07-2008 9:49 AM
Hi,
Just copy paste the below code and check
parameters : date1 like sy-datum.
data: date2 like sy-datum.
CALL FUNCTION 'OIL_LAST_DAY_OF_PREVIOUS_MONTH'
EXPORTING
I_DATE_OLD = date1
IMPORTING
E_DATE_NEW = date1.
date2 = date1.
date2+6(2) = '01'.
write:/ 'First date is :', date2.
write:/ 'Last date is :',date1.
Regards,
Surinder
10-07-2008 9:27 AM
Hi,
You have previous month. And It is sure that for any of the months first date is '01'.
So u can use '01' for the first date of the month.
Regards,
RH