10-26-2007 1:10 PM
Hi all,
I want to get the beginning of the month for a given date.
For example today is 26102007 but I need to get 01102007, any function?
Thanks.Deniz.
10-26-2007 1:14 PM
Hi!
Because a beginning of a month is always at 01, you can use this:
CONCATENATE '01' datum+2(6) INTO month_begin.
If you are using sy-datum, it is in format YYYYMMDD
CONCATENATE sy-datum(6) '01' INTO month_begin.
Regards
Tamá
10-26-2007 1:15 PM
hi Deniz,
u can use it:
data: date type sy-datum.
date = sy-datum.
date+6(2) = 01.
write: date.
Regards
Allan Cristian
10-26-2007 1:18 PM
Hi Deniz,
try this
REPORT YCHATEST2.
DATA : V_DATE LIKE SY-DATUM,
V_START LIKE SY-DATUM,
V_END LIKE SY-DATUM.
V_DATE = SY-DATUM.
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
IV_DATE = V_DATE
IMPORTING
EV_MONTH_BEGIN_DATE = V_START
EV_MONTH_END_DATE = V_END.
WRITE : / 'Start Date :' , V_START,
/ 'End Date : ' , V_END.
10-26-2007 1:18 PM
Hi,
Beginning of a month would always be starting with '01'
concatenate '01'
date+2(4)
into firstday.
regards,
sheron
10-26-2007 1:19 PM
Hi Deniz,
You can concatenate '01' like this.
As the begining of a month is always at 01:
CONCATENATE '01' date+2(6) INTO ws_startdate.
If you are using this format YYYYMMDD
CONCATENATE date(6) '01' INTO ws_startdate.
Reward If Useful ,
Regards,
Chitra
10-26-2007 1:20 PM
Hi Deniz
You can use the FM <b>RS_VARI_V_1_ACTUAL_MONTH</b>.
However this FM will give you the First Day on the current month on execution
Thanks
Vijay
<b>PLZ Reward points if helpful</b>
10-26-2007 1:45 PM