‎2007 Sep 11 7:45 AM
is any method to change the date from 11-08-2008 to 11 september 2008.
‎2007 Sep 11 7:49 AM
Hi,
your date is 11-08-2008, it means the month is August and you want to print September in the output ?
Sandeep Kaushik
Take the help from this code :
data : date(10),
text1(26),
num1(10),
test_day(15),
o_date(20),
idate type sy-datum.
data : Day(2), month(2), Year(4).
data : ODay(2), Omonth(2), OYear(4).
data : Ltext Type T247-LTX.
date = '11-08-2008'.
day = date+0(2).
month = date+3(2) + 1.
year = date+6(4).
concatenate year month day into idate.
CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
EXPORTING
idate = idate
IMPORTING
DAY = oday
MONTH = omonth
YEAR = oyear
LTEXT = ltext.
concatenate oday ltext oyear into o_date separated by SPACE.
write : O_date.
I hope, it can help you,
Please create one thread for one question,
Reward points, if helpful,
Message was edited by:
Sandeep Kaushik
‎2007 Sep 11 7:49 AM
Hi,
your date is 11-08-2008, it means the month is August and you want to print September in the output ?
Sandeep Kaushik
Take the help from this code :
data : date(10),
text1(26),
num1(10),
test_day(15),
o_date(20),
idate type sy-datum.
data : Day(2), month(2), Year(4).
data : ODay(2), Omonth(2), OYear(4).
data : Ltext Type T247-LTX.
date = '11-08-2008'.
day = date+0(2).
month = date+3(2) + 1.
year = date+6(4).
concatenate year month day into idate.
CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
EXPORTING
idate = idate
IMPORTING
DAY = oday
MONTH = omonth
YEAR = oyear
LTEXT = ltext.
concatenate oday ltext oyear into o_date separated by SPACE.
write : O_date.
I hope, it can help you,
Please create one thread for one question,
Reward points, if helpful,
Message was edited by:
Sandeep Kaushik
‎2007 Sep 11 7:54 AM
Hi,
Try with this code:
DATA: ZTEMP(9),zdd(2),zmmm(3),zyyyy(4),zfinal(12), v_date like sy-datum.
CLEAR: ZTEMP, ZDD, ZMMM, ZYYYY.
*v_date = '072307'. "mm/dd/yy
v_date = sy-datum.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
INPUT = v_date
IMPORTING
OUTPUT = ZTEMP.
write ztemp.
Regards,
Bhaskar
‎2007 Sep 11 7:59 AM
‎2007 Sep 11 8:06 AM
HI,
see this simple code.
PARAMETERS:dat type sy-datum.
data:new_date(20).
data:mon(10).
SELECT single LTX FROM T247 INTO mon
WHERE SPRAS = sy-langu AND MNR = dat+4.
CONCATENATE dat+6 mon dat(4) into new_date SEPARATED BY space.
write:/ new_date.
<b>reward if helpful</b>
rgds,
bharat.