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

System Date, Time.

Former Member
0 Likes
683

how do i display the system's date and time in text fields on load?

6 REPLIES 6
Read only

Former Member
0 Likes
655

Hi lee,

You can use the System fields,

SY-DATUM - For date.

sy-uzeit - For Time

Thanks.

Read only

Former Member
0 Likes
655

Hi lee,

1. simple

2.

REPORT Z_TEST1.

PARAMETERS : datum type sy-datum.

PARAMETERS : uzeit type sy-uzeit.

initialization.

datum = sy-datum.

uzeit = sy-uzeit.

regards,

amit m.

Read only

Former Member
0 Likes
655

HI,

if u r speaking of local date of SAP SYSTEM then use system field SY-DATUM,

but if u r speaking of date in current SAP user time zone u have to use SY-DAT10.

with regards

s.vijayendra

Read only

Former Member
0 Likes
655

Hi,

Try like this:

parameters: TodaDate like sy-datum default sy-datum,

TodaTime like sy-uzeit default sy-uzeit.

Regards,

Bhaskar

Read only

Former Member
0 Likes
655

hey thanks all, that was fast.

Read only

Former Member
0 Likes
655

Hi,

It totally depends on ur system date setting.

e.g if it is like 01.09.2007 then no problem

U can use sy-datum & sy-uzeit

But if it is like 20070901

then u have to define three variables.

pls go thru the follwing code

DATA: l_date LIKE sy-datum.

DATA: load_date(10).

l_date = sy-datum.

CONCATENATE l_date6(2) l_date4(2) l_date+0(4) INTO load_date SEPARATED BY '.' .

write: load_date.

write: sy-uzeit.

If it is helpful pls reward point.

Regards

Srimanta.