03-06-2009 6:33 AM
Hi Every body,
i stuck up with one problem,i.e i fetch date from one file ex : 20071002.
for every record i need end date of that month.Is there any function module to get last date of the month...?can any body help me
03-06-2009 6:34 AM
03-06-2009 6:39 AM
03-06-2009 6:41 AM
Follow the forum rules and award points to the helpful answers before closing the thread.
03-06-2009 6:34 AM
call function 'OIUREP_MONTH_FIRST_LAST'
exporting
i_month = l_month
i_year = l_year
i_date = l_date
importing
e_first_day = pe_fdate
e_last_day = pe_tdate
exceptions
wrong_date = 1
others = 2.
04-16-2009 4:50 PM
Hi, I couldn't find the FM in the system, it said that FM doesn't exist.
'OIUREP_MONTH_FIRST_LAST'
Do you have any idea why is it?
03-06-2009 6:38 AM
03-06-2009 6:39 AM
Hi,
use the FM FIMA_END_OF_MONTH_DETERMINE to get the last day of the month.
Thanks & Regards
Ashu Singh
03-06-2009 6:41 AM
03-06-2009 6:42 AM
03-06-2009 6:45 AM
Hi,
Here is the small piece of code u can do some changes according to ur need i hope u will get some help....
data:l_month type am_monat,
l_year type gjahr,
f_date type sy-datum,
l_date type sy-datum.
l_month = 04.
l_year = 2008.
data: fdate type sy-datum.
data:ldate type sy-datum.
CALL FUNCTION 'OIUREP_MONTH_FIRST_LAST'
EXPORTING
I_MONTH = l_month
I_YEAR = l_year
I_DATE =
IMPORTING
E_FIRST_DAY = f_date
E_LAST_DAY = l_date
EXCEPTIONS
WRONG_DATE = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ f_date.
write:/ l_date.
fdate = f_date.
ldate = l_date .
write:/ fdate dd/mm/yyyy.
write:/ ldate dd/mm/yyyy.
Thanks & Regards
Ashu Singh