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 time

Former Member
0 Likes
1,129

Hi,

I am working on a report where in which i have to upload a file to application server.Here while uploading the file i am using v_time variable to display the time when the file gets uploaded into server.I have declared v_time(8) type c.

WRITE sy-uzeit TO v_time USING EDIT MASK '__:__:__'.

but in the application server it is not showing the system time.It is showing some other time.What should be done for the system time to get displayed?

Regards,

Hema

11 REPLIES 11
Read only

Former Member
0 Likes
1,088

Hi,

You should declare u r varialble type as

sy-uzeit.

Rewardpoints if useful.

Regards

(YUGANDHAR.P)

Read only

varma_narayana
Active Contributor
0 Likes
1,088

Hi.

SY-UZEIT store the Current Time on Application Server (R/3 Server)

SY-TIMLO - Stores the Current Time on the Local Time zone.

So try accordingly.

REWARD IF HELPFUL.

Read only

Former Member
0 Likes
1,088

HI,

sy-uzeit means it will take the server time.

that may be different from ur working system.

rgds,

bharat.

Read only

Former Member
0 Likes
1,088

hi

good

instead of using SY-UZEIT try with SY-TIMLO and check the difference.

thanks

mrutyun^

Read only

former_member194152
Contributor
0 Likes
1,088

Hi,

Befor saving sy-uzeit to the varriable use GET TIME. syntax.

so it update system varriable with currewnt system tyme and then you can upload file with current Date and Time.

Regards

Gagan

Read only

0 Likes
1,088

Hi,

Can u give me some example?

Regards,

Hema

Read only

0 Likes
1,088

Try:

data v_time(8).
WRITE sy-uzeit TO v_time USING EDIT MASK '__:__:__'.

Rob

Read only

Former Member
0 Likes
1,088

Hi,

No need of using edit mask here as system will format time automatically when u use WRITE --- TO. Try like this

WRITE sy-uzeit TO v_time " shows server time

WRITE sy-timo TO v_time " local time

Read only

Former Member
0 Likes
1,088

well the edit mask you are referring to would give you a 10 characters output. i do not wonder that you run into problem trying to get a 10 characters output into a 8 character field.

Read only

Former Member
0 Likes
1,088

hi,

v_time(10) type c.

write sy-datum to v_time.

Read only

Former Member
0 Likes
1,088

HI Hema ,

Use The System Variable SY_UZEIT to get the system Time.

<b>Rewards If useful...........</b>