2008 Nov 29 11:44 AM
Hello Experts,
I wnat to display first day of the month from any date
Ex. there is 15.10.2008 Date .
Is there is fuction module to convert date into first day of the month like 01.10.2008.
Thanks & Regards,
Rahul Shinde.
2008 Nov 29 12:04 PM
hi..
Check the sample code attached for calculations of date.
Its not advisable to use Function Module for these kind of simple calculations, as when u use a FM, its whole Fun group is loaded and leads to unneccssary waste of resources.
Just execute the below code..!
TABLES: ekko.
SELECT-OPTIONS: s_bedat for ekko-bedat no INTERVALS.
data: output(10) TYPE c.
CONSTANTS: c_01(2) TYPE c VALUE '01'.
CONCATENATE c_01 '/'
S_BEDAT-low+4(2) '/'
S_BEDAT-low(4) INTO output.
WRITE:/ output.(or)
if u still want FM, then..one sample is,
CK_F_GET_FIRST_DAY_OF_DATE " pass k0 in p_perivu can find many more in se37
regards,
Padma
Hello Experts,
I wnat to display first day of the month from any date
Ex. there is 15.10.2008 Date .
Is there is fuction module to convert date into first day of the month like 01.10.2008.
Thanks & Regards,
Rahul Shinde.
2008 Nov 29 12:04 PM
hi..
Check the sample code attached for calculations of date.
Its not advisable to use Function Module for these kind of simple calculations, as when u use a FM, its whole Fun group is loaded and leads to unneccssary waste of resources.
Just execute the below code..!
TABLES: ekko.
SELECT-OPTIONS: s_bedat for ekko-bedat no INTERVALS.
data: output(10) TYPE c.
CONSTANTS: c_01(2) TYPE c VALUE '01'.
CONCATENATE c_01 '/'
S_BEDAT-low+4(2) '/'
S_BEDAT-low(4) INTO output.
WRITE:/ output.(or)
if u still want FM, then..one sample is,
CK_F_GET_FIRST_DAY_OF_DATE " pass k0 in p_perivu can find many more in se37
regards,
Padma
2008 Nov 29 12:06 PM
HI..
Take the data into date variable and replace the last two values with '01'.
data : date type sy-datum default '20080112'.
date+6(2) = '01.
2008 Nov 29 1:15 PM
2008 Nov 29 3:00 PM
Hi,
You can use the Function Module: RP_FORMATING_DATE
Thanks,
Chidanand
2008 Nov 29 3:30 PM
Hi rahul chek it,
first_day_of_curr_month = sy-datum.
first_day_of_curr_month+6(2) = '01'.
last_day_of_prev_month = first_day_of_curr_month - 1.
Regard's
SHAIK.
2008 Nov 29 4:35 PM
Hi
Use this FM : CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
Regs
SB