05-12-2005 3:33 PM
I have the current date (sy-datum)that needs to be stored in 'mmddyy'not in anyother format in the variable. I do not want to output the date directly(because I know 'mmddyy' format option is available for WRITE statement.
Therefore i want the date stored in this format because I need to concatenate this with other data and then output it. Can anyone help me in this regard.
Thanks
Moved to the right forum.
Message was edited by: Mark Finnern
05-12-2005 7:06 PM
You should post your question in the ABAP forum you'll get a very quick response there.
05-12-2005 7:06 PM
You should post your question in the ABAP forum you'll get a very quick response there.
05-13-2005 8:32 PM
Hi Santhosh,
You can actually use the WRITE statement to copy one variable to another whilst applying formatting.
Check out the following code snippet:
DATA: w_char_date(6) type c,
w_other_char(40) type c.
WRITE: sy-datum to w_char_date mmddyy.
CONCATENATE 'This is the date: ' w_char_date into w_other_car.
I have given a similiar answer in another thread, check out:
Cheers,
Brad
05-13-2005 8:43 PM
or you can simply do this
data: v_char_date(6).
concatenate sy-datum+4(2)
sy-datum+6(2)
sy-datum+2(2)
into v_char_date.
Srinivas