2007 Jun 22 6:46 PM
Hi ABAP Gurus,
I would like to retrieve current system date and time and concatenate into a variable. I would really appreciate if someone could help me. I have the following code and i seem to get some kind of error.
I would like my output to be like:
"22.JUN.2006 Some Text 12:30:22"
Code:
data: emtext like TEMSG-EMTEXT.
data: date_output(50) TYPE C.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
INPUT = SY-DATUM
IMPORTING
OUTPUT = date_output.
SHIFT date_output RIGHT DELETING TRAILING SPACE.
CONCATENATE date_output ': Some Custom Message '
INTO emtext.
Also, is there a function to convert time to text or conversion is not necessary?
Thanks.
Regards,
bw_newbie
2007 Jun 22 6:56 PM
Here is something a little closer to your requirement.
report zrich_0001 .
data: date(20) type c,
time(10) type c,
str type string.
data: xT247 type T247.
select Single * into xt247 from t247
where MNR = sy-datum+4(2).
concatenate sy-datum+6(2) xt247-ktx sy-datum(4)
INTO date separated by '.'.
write sy-uzeit to time.
concatenate date 'SomeText' time into str separated by space.
write:/ str.
Regards,
Rich Heilman
Hi ABAP Gurus,
I would like to retrieve current system date and time and concatenate into a variable. I would really appreciate if someone could help me. I have the following code and i seem to get some kind of error.
I would like my output to be like:
"22.JUN.2006 Some Text 12:30:22"
Code:
data: emtext like TEMSG-EMTEXT.
data: date_output(50) TYPE C.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
INPUT = SY-DATUM
IMPORTING
OUTPUT = date_output.
SHIFT date_output RIGHT DELETING TRAILING SPACE.
CONCATENATE date_output ': Some Custom Message '
INTO emtext.
Also, is there a function to convert time to text or conversion is not necessary?
Thanks.
Regards,
bw_newbie
2007 Jun 22 6:53 PM
2007 Jun 22 6:56 PM
Here is something a little closer to your requirement.
report zrich_0001 .
data: date(20) type c,
time(10) type c,
str type string.
data: xT247 type T247.
select Single * into xt247 from t247
where MNR = sy-datum+4(2).
concatenate sy-datum+6(2) xt247-ktx sy-datum(4)
INTO date separated by '.'.
write sy-uzeit to time.
concatenate date 'SomeText' time into str separated by space.
write:/ str.
Regards,
Rich Heilman
2007 Jun 22 8:10 PM
Hi Rich,
Thanks for the solution. I have assigned points.
Regards,
bw_newbie