Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Current Date and Timestamp

Former Member
0 Likes
441

Hi,

I want to display the current DATE and TIMESTAMP (as AUG 07 2006, 6:24:49).Please tell me how can I get it in my report? Thanks..

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
402

Please try this sample progam.



report zrich_0001.

data: timestamp type string.
data: tmp_datum type string.
data: tmp_uzeit(10) type c.
data: imonths type table of t247 with header line.

call function 'MONTH_NAMES_GET'
     tables
          month_names = imonths.

read table imonths with key spras = sy-langu
                            mnr   = sy-datum+4(2).

concatenate imonths-ktx sy-datum+6(2) sy-datum+0(4) into tmp_datum
                separated by space.
concatenate tmp_datum ',' into tmp_datum.

write sy-uzeit to tmp_uzeit.

concatenate tmp_datum tmp_uzeit into timestamp separated by space.

write:/ timestamp.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
402

CALL This function module,

CONVERSION_EXIT_SDATE_OUTPUT

data: date type sy-datum, text(20).

date = sy-datum. "20060807

CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'

EXPORTING

INPUT = date

IMPORTING

OUTPUT = text.

further help, refer this link:

now text will have "AUG/07/2006"

then print this TEXT along with TIMESTAMP

regards

srikanth

regards

srikanth.